version: "3.8" services: db: image: postgres:15 container_name: polisplexity_postgres restart: always volumes: - pgdata:/var/lib/postgresql/data env_file: - .env ports: - "5434:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 10s retries: 5 timeout: 5s web: build: . container_name: polisplexity_django restart: always depends_on: db: condition: service_healthy volumes: - .:/app # Sync local code into container for live reload ports: - "8001:8001" env_file: - .env command: python manage.py runserver 0.0.0.0:8001 volumes: pgdata: