services: postgres: image: postgres:16-alpine environment: POSTGRES_USER: snitch POSTGRES_PASSWORD: snitch POSTGRES_DB: snitch ports: - "5432:5432" volumes: - snitch_pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U snitch"] interval: 5s timeout: 5s retries: 10 redis: image: redis:7-alpine ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 10 service: build: context: . dockerfile: apps/service/Dockerfile env_file: .env environment: DATABASE_URL: postgres://snitch:snitch@postgres:5432/snitch REDIS_URL: redis://redis:6379 ports: - "3000:3000" depends_on: postgres: condition: service_healthy redis: condition: service_healthy command: ["node", "dist/server.js"] worker: build: context: . dockerfile: apps/service/Dockerfile env_file: .env environment: DATABASE_URL: postgres://snitch:snitch@postgres:5432/snitch REDIS_URL: redis://redis:6379 depends_on: postgres: condition: service_healthy redis: condition: service_healthy command: ["node", "dist/worker.js"] dashboard: build: context: . dockerfile: apps/dashboard/Dockerfile environment: SNITCH_API_URL: http://service:3000 ports: - "3001:3001" depends_on: - service volumes: snitch_pgdata: