version: '3.8' services: redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis-data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 3 server: build: context: . dockerfile: packages/server/Dockerfile ports: - "3000:3000" environment: - NODE_ENV=production - REDIS_URL=redis://redis:6379 - PORT=3000 depends_on: redis: condition: service_healthy restart: unless-stopped client: build: context: . dockerfile: packages/client/Dockerfile ports: - "80:80" depends_on: - server restart: unless-stopped volumes: redis-data: