Table of Contents
🌏 中文版
Dokku turns a Linux and Docker server into a Heroku-like PaaS. After app creation, git push triggers build and release; Dockerfiles and existing images also work. The dokku CLI manages processes, config, domains, proxies, and linked services.
Build, release, and run form a host pipeline
Herokuish buildpacks convert source to an image by default, or a Dockerfile can make the build explicit. Apps listen on PORT, Procfile process types split web and worker roles, and ps:scale sets counts. Nginx proxies web processes and round-robins their containers.
Builds execute repository content, making deploy keys, the Docker socket, caches, and host disk attack surfaces. Restrict push authority, pin builders and images, keep production SSH keys outside build contexts, and monitor image and cache growth.
Plugins expand capability and operations
Core Dokku does not ship databases. Official or community plugins create and link data services or automate Let's Encrypt. Plugins may install root hooks, change proxies, and own state, so inventory provenance, versions, compatibility, and restoration before upgrades. An injected DATABASE_URL provides connectivity, not migrations, backups, or HA.
Container filesystems are volatile. Storage mounts host directories or volumes but binds apps to the host. Prefer object storage for uploads and database-native dumps or logs over copying live data directories.
Single-host simplicity is the boundary
Backup and Recovery must cover Dokku config, apps, plugins, TLS, storage, and every datastore. Restored custom plugins can require installation triggers. Losing the host loses control plane, runtime, and local state together, so rehearse recovery onto a clean server.
Dokku fits small, single-host deployments with a CLI and Git workflow and a team comfortable operating Linux. Coolify or Dokploy add dashboards and remotes; Swarm or Kubernetes add multi-node scheduling. Test whole-host reconstruction, bad-release rollback, worker redelivery, certificate renewal, and database restore.
References
Loading...