services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: ${POSTGRES_DB:-nexamfa} POSTGRES_USER: ${POSTGRES_USER:-nexamfa} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-nexamfa} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-nexamfa} -d ${POSTGRES_DB:-nexamfa}"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7-alpine command: ["redis-server", "--appendonly", "yes"] volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 backend: build: ./backend env_file: .env depends_on: postgres: condition: service_healthy redis: condition: service_healthy ports: - "8000:8000" frontend: build: ./frontend depends_on: - backend ports: - "8080:80" volumes: postgres_data: redis_data: