Linux command
dokku 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create an app
dokku apps:create [app_name]
Deploy via git push
git push dokku main
List all apps
dokku apps:list
View app logs
dokku logs [app_name]
Set environment variable
dokku config:set [app_name] [KEY]=[value]
Link database
dokku postgres:link [db_name] [app_name]
Scale app processes
dokku ps:scale [app_name] web=[2]
Add domain
dokku domains:add [app_name] [example.com]
说明
Dokku is a self-hosted Platform-as-a-Service (PaaS) that implements a Heroku-like workflow. It uses Docker containers and buildpacks to deploy applications from git push. The platform automatically detects application type, builds containers, manages routing, and handles SSL certificates. Plugins extend functionality with databases (PostgreSQL, MySQL, Redis), cron jobs, and more. Dokku provides a simple deployment experience: push code to the server, and it handles building, deploying, and scaling. It's ideal for small teams wanting Heroku-like convenience on their own infrastructure.
参数
- apps:create _NAME_
- Create new application.
- apps:list
- List all applications.
- logs _APP_
- View application logs.
- config:set _APP_ _KEY=VALUE_
- Set environment variable.
- ps:scale _APP_ _PROC=N_
- Scale process count.
- domains:add _APP_ _DOMAIN_
- Add custom domain.
- --help
- Display help information.
FAQ
What is the dokku command used for?
Dokku is a self-hosted Platform-as-a-Service (PaaS) that implements a Heroku-like workflow. It uses Docker containers and buildpacks to deploy applications from git push. The platform automatically detects application type, builds containers, manages routing, and handles SSL certificates. Plugins extend functionality with databases (PostgreSQL, MySQL, Redis), cron jobs, and more. Dokku provides a simple deployment experience: push code to the server, and it handles building, deploying, and scaling. It's ideal for small teams wanting Heroku-like convenience on their own infrastructure.
How do I run a basic dokku example?
Run `dokku apps:create [app_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does apps:create _NAME_ do in dokku?
Create new application.