services: postgres: image: postgres:16 container_name: fog-postgres restart: unless-stopped environment: POSTGRES_DB: fog_expedition POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - '5432:5432' volumes: - fog_postgres_data:/var/lib/postgresql/data healthcheck: test: ['CMD-SHELL', 'pg_isready -U postgres -d fog_expedition'] interval: 5s timeout: 5s retries: 10 redis: image: redis:7 container_name: fog-redis restart: unless-stopped ports: - '6379:6379' healthcheck: test: ['CMD', 'redis-cli', 'ping'] interval: 5s timeout: 3s retries: 10 api: build: context: . dockerfile: apps/api/Dockerfile env_file: - .env depends_on: postgres: condition: service_healthy redis: condition: service_healthy ports: - '3333:3333' volumes: fog_postgres_data: