# Staging deploy for the Halo Bestie backend (self-hosted Docker). # Usage: # cd backend # docker compose -f docker-compose.staging.yml up -d # # Prereqs: a populated .env.staging (cp .env.example .env.staging) and the # Firebase service-account JSON at the mounted host path below. See DEPLOY.md. # # This runs ONLY the backend. Postgres + Valkey are expected to be reachable # via DATABASE_URL / VALKEY_URL in .env.staging (managed/self-hosted elsewhere). # TLS termination + the public hostname are handled by a reverse proxy in front. services: backend: image: ${BACKEND_IMAGE:-halobestie-backend:staging} # To build on the host instead of pulling a pushed image, comment out # `image:` above and uncomment: # build: . container_name: halobestie-staging env_file: .env.staging ports: - "3000:3000" # public listener only — never publish 3001 volumes: # Firebase service-account JSON (must match the env's Firebase project, # staging = my-bestie-876ec). FIREBASE_SERVICE_ACCOUNT_PATH in .env.staging # must equal the in-container path on the right. - /opt/halobestie/secrets/firebase-sa.json:/secrets/firebase-sa.json:ro # Optional: only needed if XENDIT_WEBHOOK_FALLBACK_ENABLED=true (writes # rolling JSONL to /app/logs). App logs themselves go to stdout — see DEPLOY.md §8. - backend-logs:/app/logs restart: unless-stopped logging: driver: json-file options: max-size: "10m" max-file: "5" volumes: backend-logs: