--- # docker compose file for production environment services: backend: build: dockerfile: Dockerfile-backend ports: - "${BACKEND_PORT}:${BACKEND_PORT}" env_file: - .env environment: ENVIRONMENT: production BACKEND_LOG_LEVEL: warning DATABASE_HOST: postgres depends_on: postgres: condition: service_healthy networks: - app-network frontend: build: dockerfile: Dockerfile-frontend env_file: - .env environment: FRONTEND_LOG_LEVEL: warning ports: - "${FRONTEND_PORT}:${FRONTEND_PORT}" depends_on: - backend networks: - app-network postgres: image: postgres:17 expose: - "${DATABASE_PORT}:${DATABASE_PORT}" volumes: - postgres-data:/var/lib/postgresql/data networks: - app-network env_file: - .env environment: POSTGRES_USER: ${DATABASE_USER} POSTGRES_PASSWORD: ${DATABASE_PASSWORD} POSTGRES_DB: ${DATABASE_NAME} healthcheck: test: [ "CMD", "pg_isready", "-U", "${DATABASE_USER}", "-d", "${DATABASE_NAME}", ] interval: 30s timeout: 10s retries: 3 start_period: 10s volumes: postgres-data: networks: app-network: driver: bridge