Deployment
Dokku Deployment
Using Penny with Dokku containers
Penny integrates with Dokku to manage Dokku app containers on demand.
Overview
With Dokku, apps run as Docker containers. Penny can start and stop these containers using separate start/stop commands for graceful container management.
Generating Configuration
Use the penny dokku generate command to create a penny.toml from your existing Dokku apps:
penny dokku generateManual Configuration
You can also configure Dokku apps manually using the table command form:
["myapp.example.com".command]
start = "docker start myapp.web.1"
end = "docker stop myapp.web.1"This ensures containers are properly stopped instead of being killed.
Full Example
api_address = "0.0.0.0:3031"
[tls]
enabled = true
acme_email = "you@example.com"
["myapp.example.com"]
address = "127.0.0.1:5001"
health_check = "/"
wait_period = "15m"
["myapp.example.com".command]
start = "docker start myapp.web.1"
end = "docker stop myapp.web.1"
["api.example.com"]
address = "127.0.0.1:5002"
health_check = "/health"
wait_period = "10m"
["api.example.com".command]
start = "docker start api.web.1"
end = "docker stop api.web.1"Tips
- Use
penny checkto validate your Dokku config before deploying - Container names follow Dokku's naming convention:
appname.processtype.number - Make sure containers exist before starting Penny (deploy your Dokku apps first)
- Combine with systemd deployment for automatic startup:
penny systemd install penny.toml