services: postgres: image: postgres:16-alpine container_name: aitrip-postgres restart: unless-stopped environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: ai_trip ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d ai_trip"] interval: 10s timeout: 5s retries: 5 networks: - aitrip-network backend: build: context: ./backend dockerfile: Dockerfile container_name: aitrip-backend restart: unless-stopped ports: - "8000:8000" environment: DATABASE_URL: postgresql://postgres:postgres@postgres:5432/ai_trip SECRET_KEY: ${SECRET_KEY:-development-secret-jwt-key-replace-in-production} GEMINI_API_KEY: ${GEMINI_API_KEY:-} CORS_ORIGINS: http://localhost:5173,http://localhost:80,http://127.0.0.1:5173 depends_on: postgres: condition: service_healthy healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 15s timeout: 5s retries: 3 start_period: 10s networks: - aitrip-network frontend: build: context: ./front-end dockerfile: Dockerfile args: VITE_API_BASE_URL: http://localhost:8000 container_name: aitrip-frontend restart: unless-stopped ports: - "5173:80" depends_on: backend: condition: service_healthy healthcheck: test: ["CMD-SHELL", "wget -q -O - http://localhost:80/health || exit 1"] interval: 20s timeout: 5s retries: 3 networks: - aitrip-network volumes: postgres_data: driver: local networks: aitrip-network: driver: bridge