services: # ---------- PostgreSQL ---------- postgres: image: postgres:16-alpine container_name: geo-postgres restart: unless-stopped ports: - "5432:5432" environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: geo_optimizer volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 # ---------- Redis ---------- redis: image: redis:7-alpine container_name: geo-redis restart: unless-stopped ports: - "6379:6379" command: redis-server --appendonly yes volumes: - redisdata:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 # ---------- Server ---------- server: build: context: . dockerfile: Dockerfile.server container_name: geo-server restart: unless-stopped ports: - "3000:3000" env_file: .env environment: DATABASE_URL: postgresql://postgres:postgres@postgres:5432/geo_optimizer REDIS_URL: redis://redis:6379 depends_on: postgres: condition: service_healthy redis: condition: service_healthy # ---------- Worker ---------- worker: build: context: . dockerfile: Dockerfile.worker container_name: geo-worker restart: unless-stopped env_file: .env environment: DATABASE_URL: postgresql://postgres:postgres@postgres:5432/geo_optimizer REDIS_URL: redis://redis:6379 PLAYWRIGHT_HEADLESS: "true" depends_on: postgres: condition: service_healthy redis: condition: service_healthy volumes: pgdata: redisdata: