services: redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 postgres: image: postgres:16-alpine ports: - "5432:5432" environment: POSTGRES_USER: trading POSTGRES_PASSWORD: trading POSTGRES_DB: trading volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-LINE", "pg_isready", "-U", "trading"] interval: 5s timeout: 3s retries: 5 data-collector: build: context: . dockerfile: services/data-collector/Dockerfile env_file: .env depends_on: redis: condition: service_healthy postgres: condition: service_healthy restart: unless-stopped strategy-engine: build: context: . dockerfile: services/strategy-engine/Dockerfile env_file: .env depends_on: redis: condition: service_healthy postgres: condition: service_healthy restart: unless-stopped order-executor: build: context: . dockerfile: services/order-executor/Dockerfile env_file: .env depends_on: redis: condition: service_healthy postgres: condition: service_healthy restart: unless-stopped portfolio-manager: build: context: . dockerfile: services/portfolio-manager/Dockerfile env_file: .env depends_on: redis: condition: service_healthy postgres: condition: service_healthy restart: unless-stopped volumes: redis_data: postgres_data: