pkmntrade.club/docker-compose.yml

41 lines
No EOL
860 B
YAML

services:
loba:
image: haproxy:3.1
stop_signal: SIGTERM
ports:
- 8000:8000
volumes:
- ./haproxy/haproxy.dev.cfg:/usr/local/etc/haproxy/haproxy.cfg
depends_on:
- web
web:
build: .
volumes:
- ./.env.dev:/.env:ro
env_file:
- .env.dev
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
db:
image: postgres:16
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data: