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.
-
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.
FQDN of the final panel on the hostkey.in domain¶
The application uses a dynamic domain template based on the server ID.
| 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 combination of an official bootstrap script and dependency configuration:
-
System Preparation: The server's
/etc/hostsfile is updated to ensure the local hostname resolves to127.0.0.1. -
Bootstrap Script: The official Dokku bootstrap script (version
v0.34.8) is downloaded fromhttps://dokku.com/install/v0.34.8/bootstrap.shand executed. -
Global Domain Configuration: The global domain for the instance is set to
{prefix}{Server_ID_from_Invapi}.hostkey.in. -
Core Dependencies: The command
dokku plugin:install-dependencies --coreis executed to install necessary system components for Dokku's core functionality. -
Reverse Proxy Setup: A Docker Compose deployment is initialized in
/root/nginxto manage SSL certificates and Nginx routing.
Access Rights and Security¶
-
Firewall: The application relies on the host's firewall allowing traffic on port
443. -
User Privileges: Administrative tasks are performed with root privileges.
-
SSL/TLS: SSL certificates are managed via a dedicated container using Let's Encrypt.
Docker Containers and Their Deployment¶
The deployment includes one application-related container used for Nginx and SSL management:
| Image | Ports | Volumes | Environment Variables | Restart Policy |
|---|---|---|---|---|
jonasal/nginx-certbot:latest | Host Network Mode | - nginx_secrets:/etc/letsencrypt- /data/nginx/user_conf.d:/etc/nginx/user_conf.d | [email protected] | unless-stopped |
Note: This container operates using the host's network mode to facilitate direct access to ports.
Application Update Instructions¶
To update the Dokku application, you must re-run the installation script with the desired version tag:
For the Nginx reverse proxy component, use the following command in the /root/nginx directory:
Location of configuration files and data¶
The following directories are used for storing configurations and certificates:
-
Nginx Configuration:
/data/nginx/user_conf.d -
SSL Certificates: Managed via the
nginx_secretsDocker volume. -
Docker Compose Files:
/root/nginx/compose.yml
Available ports for connection¶
| Port | Service | Access Type |
|---|---|---|
443 | HTTPS (Nginx) | External |