The Emakin Docker image contains only the application; external dependencies (database, Redis, etc.) must be managed separately. This approach is suitable for more advanced deployment scenarios using Docker Compose or Kubernetes.
The following docker-compose.yml example demonstrates deploying Emakin with HAProxy for load balancing across multiple web application instances:
1 2 3 4 5 6 7 8 9101112131415
# ... (previous services definition) ...haproxy:image:haproxy:latestvolumes:-"./haproxy.cfg:/usr/local/etc/haproxy:ro"# Path to HAProxy configrestart:alwaysports:-"80:80"-"443:443"-"7180:7180"-"25:25"-"587:587"-"465:465"# ... (rest of the configuration) ...
You'll need to create a separate HAProxy configuration file (haproxy.cfg). A sample configuration is provided below. Adapt this to your environment's IP addresses and port settings.
Sample haproxy.cfg:
1 2 3 4 5 6 7 8 9101112131415
frontend http
bind *:80
bind *:443
bind *:5000
mode http
timeout client 1000s
use_backend all
backend all
mode http
timeout server 1000s
timeout connect 1000s
server s1 web1:80
server s2 web2:80
server s3 web3:80