services: postgres: image: postgres:15-alpine container_name: atlas-postgres ports: - "5432:5432" environment: POSTGRES_DB: ${POSTGRES_DB:-atlas} POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-atlas}"] interval: 5s timeout: 5s retries: 10 volumes: - postgres_data:/var/lib/postgresql/data redis: image: redis:7-alpine container_name: atlas-redis ports: - "6379:6379" command: ["redis-server", "--requirepass", "${REDIS_PASSWORD:-}"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 10 api: build: context: . dockerfile: src/Atlas.Api/Dockerfile container_name: atlas-api ports: - "5000:5000" env_file: .env environment: - DB_CONNECTION_STRING=Host=postgres;Database=${POSTGRES_DB:-atlas};Username=${POSTGRES_USER:-postgres};Password=${POSTGRES_PASSWORD:-postgres} - REDIS_CONNECTION_STRING=redis:6379 - JWT_SECRET=${JWT_SECRET} - JWT_ISSUER=${JWT_ISSUER:-atlas-api} - JWT_AUDIENCE=${JWT_AUDIENCE:-atlas-dashboard} - JWT_EXPIRY_MINUTES=${JWT_EXPIRY_MINUTES:-60} - API_ADMIN_KEY=${API_ADMIN_KEY} - ASPNETCORE_URLS=http://+:5000 depends_on: postgres: condition: service_healthy redis: condition: service_healthy scheduler: build: context: . dockerfile: src/Atlas.Scheduler/Dockerfile container_name: atlas-scheduler env_file: .env environment: - DB_CONNECTION_STRING=Host=postgres;Database=${POSTGRES_DB:-atlas};Username=${POSTGRES_USER:-postgres};Password=${POSTGRES_PASSWORD:-postgres} - REDIS_CONNECTION_STRING=redis:6379 depends_on: postgres: condition: service_healthy redis: condition: service_healthy worker-1: build: context: . dockerfile: src/Atlas.Worker/Dockerfile container_name: atlas-worker-1 env_file: .env environment: - DB_CONNECTION_STRING=Host=postgres;Database=${POSTGRES_DB:-atlas};Username=${POSTGRES_USER:-postgres};Password=${POSTGRES_PASSWORD:-postgres} - REDIS_CONNECTION_STRING=redis:6379 - WORKER_ID=worker-1 - CONCURRENCY_LIMIT=${CONCURRENCY_LIMIT:-5} depends_on: postgres: condition: service_healthy redis: condition: service_healthy worker-2: build: context: . dockerfile: src/Atlas.Worker/Dockerfile container_name: atlas-worker-2 env_file: .env environment: - DB_CONNECTION_STRING=Host=postgres;Database=${POSTGRES_DB:-atlas};Username=${POSTGRES_USER:-postgres};Password=${POSTGRES_PASSWORD:-postgres} - REDIS_CONNECTION_STRING=redis:6379 - WORKER_ID=worker-2 - CONCURRENCY_LIMIT=${CONCURRENCY_LIMIT:-5} depends_on: postgres: condition: service_healthy redis: condition: service_healthy volumes: postgres_data: