Ctrl K
ComunidadGuías…

docker-compose.review.yml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# Isolated local UI review; never a production deployment target.
# Use an explicit staging env file and a distinct Compose project.
# Ports bind to loopback; game data is read-only, uploads/database use separate volumes.
# See docs/runbooks/docker-compose-deploy.md for setup and recovery.

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    image: oneirodex:review
    container_name: ${ONEIRODEX_REVIEW_PREFIX:-oneirodex-review}-app
    depends_on:
      db:
        condition: service_healthy
    ports:
      - "127.0.0.1:${ONEIRODEX_REVIEW_PORT:-6120}:5006"
    environment:
      - DATABASE_URL=postgresql://postgres:postgres@db:5432/oneirodex
      - DATABASE_HOST=db
      - DATABASE_PORT=5432
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=oneirodex
      - SECRET_KEY=review-only-not-a-production-secret
      - DATA_FOLDER_GAMES=/storage
      - UPLOAD_FOLDER=/app/oneirodex/static/library
      # Regenerates preset themes on boot, which this review needs: od-shell.css
      # and od-density.css are new files and only reach a theme folder on sync.
      - DEV_MODE=true
      - ONEIRODEX_ENABLE_BACKGROUND_WORKERS=false
      - FETCH_WEBRETRO_CORES_ON_BOOT=false
      - SESSION_COOKIE_SECURE=false
      - REMEMBER_COOKIE_SECURE=false
      # Local GPU SD.Next on this Windows box (docker-compose.artwork-local.yml).
      # host.docker.internal is the workstation, not another container.
      - ENABLE_AI_ARTWORK=false
      - AI_ARTWORK_ENGINE=a1111
      - AI_ARTWORK_URL=http://host.docker.internal:7860
    extra_hosts:
      - "host.docker.internal:host-gateway"
    volumes:
      - review_storage:/storage:ro
      - review_library:/app/oneirodex/static/library

  db:
    image: postgres:17.6
    container_name: ${ONEIRODEX_REVIEW_PREFIX:-oneirodex-review}-db
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=oneirodex
      - PGDATA=/var/lib/postgresql/data/pgdata
    ports:
      # The review app uses `oneirodex`; pytest uses its own `oneirodextest` in
      # this container (created once: docs/runbooks/local-postgres-pytest.md),
      # so a test run never wipes the review data.
      # Published so local pytest still has a database while this stack is up.
      # Without it, replacing the main db container silently breaks every test
      # that needs Postgres — which looked like 14 code failures, not a missing
      # port mapping.
      - "127.0.0.1:${ONEIRODEX_REVIEW_DB_PORT:-5432}:5432"
    volumes:
      - review_db:/var/lib/postgresql/data/pgdata
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -d oneirodex"]
      interval: 5s
      timeout: 5s
      retries: 20

volumes:
  review_db:
  review_library:
  review_storage: