pkmntrade.club/docker-compose_prod.yml

27 lines
648 B
YAML

services:
loba:
image: haproxy:3.1
stop_signal: SIGTERM
ports:
- 443:443
entrypoint: ["/usr/local/bin/haproxy.entrypoint.sh"]
volumes:
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
- ./scripts/haproxy.entrypoint.sh:/usr/local/bin/haproxy.entrypoint.sh
depends_on:
- web
web:
build: .
volumes:
- ./.env.production:/.env:ro
env_file:
- .env.production
deploy:
mode: replicated
replicas: 4
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s