services: postgres: image: postgres:16-alpine container_name: prod-leopost-postgres restart: unless-stopped environment: POSTGRES_DB: leopost POSTGRES_USER: leopost POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-leopost_pg_2026} volumes: - ./pgdata:/var/lib/postgresql/data - ./backups:/backups networks: - prod_leopost_net healthcheck: test: ["CMD-SHELL", "pg_isready -U leopost -d leopost"] interval: 10s timeout: 5s retries: 5 deploy: resources: limits: memory: 512M cpus: '0.5' app: build: context: . dockerfile: Dockerfile args: VITE_BASE_PATH: "" VITE_API_BASE: "/api" container_name: prod-leopost-full-app restart: unless-stopped command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] depends_on: postgres: condition: service_healthy volumes: - ./data:/app/data environment: - DATABASE_URL=postgresql://leopost:${POSTGRES_PASSWORD:-leopost_pg_2026}@postgres:5432/leopost - APP_URL=https://leopost.it - GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID} - GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET} - SECRET_KEY=${SECRET_KEY:-leopost-prod-secret-2026} networks: - prod_leopost_net - proxy_net deploy: resources: limits: memory: 1024M cpus: '1.0' networks: prod_leopost_net: name: prod_leopost_net proxy_net: external: true