version: "3.9" services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres} POSTGRES_DB: miraframe volumes: - pgdata:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 server: build: context: . dockerfile: Dockerfile.server ports: - "3000:3000" environment: DATABASE_URL: postgres://postgres:${DB_PASSWORD:-postgres}@postgres:5432/miraframe REDIS_URL: redis://redis:6379/0 NODE_ENV: production depends_on: postgres: condition: service_healthy redis: condition: service_healthy frontend: build: context: . dockerfile: Dockerfile.frontend ports: - "80:80" depends_on: - server volumes: pgdata: