services: db: image: postgres:17-alpine container_name: empay-postgres restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB:-empay_db} POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} ports: - "${POSTGRES_HOST_PORT:-5433}:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-empay_db}"] interval: 10s timeout: 5s retries: 5 backend: build: context: ./backend container_name: empay-backend restart: unless-stopped environment: PORT: ${BACKEND_PORT:-5000} DATABASE_URL: ${DATABASE_URL:-postgresql://postgres:postgres@db:5432/empay_db} JWT_SECRET: ${JWT_SECRET:-empay_super_secret_jwt_key_2024} JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-7d} FRONTEND_URL: ${FRONTEND_URL:-http://localhost:5173} NODE_ENV: ${NODE_ENV:-development} ports: - "${BACKEND_PORT:-5000}:${BACKEND_PORT:-5000}" volumes: - backend_uploads:/app/uploads depends_on: db: condition: service_healthy healthcheck: test: [ "CMD-SHELL", "node -e \"fetch('http://localhost:${BACKEND_PORT:-5000}/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\"" ] interval: 30s timeout: 10s retries: 3 start_period: 20s frontend: build: context: ./frontend args: VITE_API_URL: ${VITE_API_URL:-http://localhost:5000/api} container_name: empay-frontend restart: unless-stopped ports: - "${FRONTEND_PORT:-5173}:80" depends_on: backend: condition: service_healthy volumes: postgres_data: backend_uploads: