Files
WYGIWYH/docker-compose.prod.yml
2024-10-11 14:11:40 -03:00

57 lines
1.1 KiB
YAML

version: '3.8'
services:
web: &django
build:
context: .
dockerfile: ./docker/prod/django/Dockerfile
image: ${SERVER_NAME}
container_name: ${SERVER_NAME}
command: /start
volumes:
- temp:/temp
ports:
- "${OUTBOUND_PORT}:8000"
env_file:
- .env
depends_on:
- db
restart: unless-stopped
healthcheck:
test: curl --fail http://localhost:8000/ht/health || exit 1
interval: 60s
timeout: 30s
retries: 3
start_period: 360s
labels:
- "com.centurylinklabs.watchtower.enable=false"
db:
image: postgres:15
container_name: ${DB_NAME}
restart: unless-stopped
volumes:
- ./postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${SQL_USER}
- POSTGRES_PASSWORD=${SQL_PASSWORD}
- POSTGRES_DB=${SQL_DATABASE}
procrastinate:
<<: *django
image: ${PROCRASTINATE_NAME}
container_name: ${PROCRASTINATE_NAME}
depends_on:
- db
ports: [ ]
command: /start-procrastinate
restart: unless-stopped
networks:
default:
name: compose_default
external: true
volumes:
temp: