Deployment Overview of Dokku on Server¶
Prerequisites and Basic Requirements¶
-
Operating System: Ubuntu
-
Privileges: Root access or
sudoprivileges are required to execute installation and management commands. -
Domain: A DNS record must point to the configured domain name for the application.
-
Ports: Port
443(HTTPS) is the designated external port for incoming traffic.
FQDN of the Final Panel¶
The application is accessible via the Fully Qualified Domain Name (FQDN) constructed with the following format: <prefix><Server ID>.hostkey.in:443
Based on the configuration parameters:
-
Zone:
hostkey.in -
Prefix:
dokku -
Example FQDN:
dokku<Server ID>.hostkey.in
Application Installation Process¶
The application is deployed using the official Dokku bootstrap script with a specific version pinned to ensure consistency.
-
Version:
v0.34.8 -
Installation Script:
bootstrap.sh -
Installation Steps:
-
Download the bootstrap script to
/tmp/bootstrap.shfrom the official Dokku repository. -
Execute the installation using the following command:
-
Set the global domain for the Dokku instance:
-
Install core dependencies for the Dokku environment:
Docker Containers and Their Deployment¶
The reverse proxy and SSL certificate management are handled by Docker containers orchestrated via Docker Compose.
-
Directory:
/root/nginx -
Orchestration File:
compose.yml -
Container Image:
jonasal/nginx-certbot:latest -
Deployment Command:
This command is executed within the/root/nginxdirectory.
Container Configuration¶
The Docker Compose setup includes the following specifications:
| Parameter | Value / Description |
|---|---|
| Service Name | nginx |
| Image | jonasal/nginx-certbot:latest |
| Restart Policy | unless-stopped |
| Network Mode | host |
| Environment Variable | [email protected] |
| Env File | /data/nginx/nginx-certbot.env |
| Volume Mounts | - nginx_secrets mounted to /etc/letsencrypt- /data/nginx/user_conf.d mounted to /etc/nginx/user_conf.d |
Proxy Servers¶
The nginx-certbot container serves as the reverse proxy, handling HTTPS termination and SSL certificate management via Let's Encrypt.
-
Proxy Configuration Directory:
/etc/nginx/user_conf.d(mapped from/data/nginx/user_conf.d) -
SSL Certificates Location:
/etc/letsencrypt(mapped fromnginx_secretsvolume) -
Certificate Email:
[email protected] -
External Port:
443 -
Internal Path Mapping:
/
Permission Settings¶
Specific directories are configured with defined ownership and permissions to ensure the services function correctly:
-
Directory:
/root/nginx -
Owner:
root -
Group:
root -
Mode:
0755 -
File:
/root/nginx/compose.yml -
Owner:
root -
Group:
root -
Mode:
0644
Location of Configuration Files and Data¶
-
Dokku Domain Configuration: Managed globally via the
dokku domains:set-globalcommand. -
Docker Compose File:
/root/nginx/compose.yml -
Nginx User Configuration Directory:
/data/nginx/user_conf.d -
Certbot Environment Variables:
/data/nginx/nginx-certbot.env -
SSL Secrets Volume: Mapped to
/etc/letsencryptinside the container.
Available Ports for Connection¶
- Port
443: Secure HTTPS traffic for the Dokku application and proxy.