# Local development and single-host deployment. # # cp .env.example .env # then edit # docker compose up --build # # Reaching Prometheus and OpenStack still depends on the CX-Tools containers # being up on the same host - see docs/DEPLOYMENT.md. services: app: build: context: . dockerfile: backend/Dockerfile image: cx-triage:local ports: - "${CX_PORT:-8080}:8080" env_file: [.env] environment: CX_DATABASE_URL: ${CX_DATABASE_URL:-postgresql+psycopg://cx:cx@db:5432/cxtriage} CX_STATIC_DIR: /app/static volumes: # The engine shells out to `docker exec -osc ...`, so it needs the # host's Docker socket. Mount read-only and drop it if you point the app # at Prometheus/OpenStack directly instead. - /var/run/docker.sock:/var/run/docker.sock:ro - cx-data:/data depends_on: db: { condition: service_healthy } restart: unless-stopped db: image: postgres:16-alpine environment: POSTGRES_USER: cx POSTGRES_PASSWORD: cx POSTGRES_DB: cxtriage volumes: - cx-db:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U cx -d cxtriage"] interval: 5s timeout: 3s retries: 20 restart: unless-stopped volumes: cx-data: cx-db: