Deployment Overview of Dokku on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Ubuntu.
-
Privileges: Root or sudo access is required for installation and configuration.
-
Network/Ports:
-
Port
443(HTTPS) must be open for external traffic. -
Domain Configuration: The server hostname must resolve to
127.0.0.1in the/etc/hostsfile to allow the Dokku bootstrap process to complete successfully.
FQDN of the final panel on the hostkey.in domain¶
The application uses a specific domain template for its global configuration.
| Parameter | Value |
|---|---|
| Prefix | dokku |
| Domain | hostkey.in |
| Full template | dokku{Server_ID_from_Invapi}.hostkey.in |
Application installation process¶
The installation of Dokku is performed using a dedicated bootstrap script and manual configuration steps:
-
System Preparation: The server's
/etc/hostsfile is updated to ensure the local hostname resolves to127.0.0.1. -
Bootstrap Execution: The official Dokku bootstrap script (version
v0.38.34) is downloaded fromhttps://dokku.com/install/v0.38.34/bootstrap.shand executed to install the core application components. -
Global Domain Configuration: The global domain for the instance is set using the command:
dokku domains:set-global dokku{Server_ID_from_Invapi}.hostkey.in. -
Dependency Installation: Core dependencies required by Dokku are installed via the plugin manager using
dokku plugin:install-dependencies --core. -
Proxy Setup: A Docker Compose deployment is initialized in
/root/nginxto manage SSL certificates and Nginx proxying.
Access Rights and Security¶
-
Firewall: Ensure that port
443is accessible from the public internet. -
User Permissions: The installation process requires administrative privileges. Configuration files are managed under
/root/nginxand/data/nginx.
Docker Containers and Their Deployment¶
The deployment utilizes a Docker container to handle SSL termination and Nginx proxying via Docker Compose.
| Container Name | Image | Ports | Volumes | Environment Variables | Restart Policy |
|---|---|---|---|---|---|
nginx | jonasal/nginx-certbot:latest | Host Network Mode | - nginx_secrets:/etc/letsencrypt- /data/nginx/user_conf.d:/etc/nginx/user_conf.d | [email protected] (plus settings from /data/nginx/nginx-certbot.env) | unless-stopped |
Application Update Instructions¶
To update the Dokku application, you must re-run the installation script using the desired version:
-
Download the updated bootstrap script for the target version.
-
Execute the installer with the specific tag:
Location of configuration files and data¶
-
Nginx Compose File:
/root/nginx/compose.yml -
Nginx Environment Variables:
/data/nginx/nginx-certbot.env -
User Configuration Directory:
/data/nginx/user_conf.d -
SSL Certificates (Docker Volume):
nginx_secrets
Available ports for connection¶
- HTTPS:
443(via Nginx proxy)