# PC-only override for the nocturne preview drain.
# Use beside the gallery compose on the Prawns share:
#   docker compose -f compose.yaml -f nocturne-drain.compose.yaml up -d --build
# Do not copy this over gallery/compose.yaml. That file must keep the
# saltierpoop saltbox network.
services:
  gallery:
    networks: !reset
      - default
    ports: !override
      - "0.0.0.0:8427:8427"
    environment:
      GALLERY_WORKERS: "10"
      # Uvicorn honors X-Forwarded-Proto only from the TCP peer.
      # Published-port connections arrive as the docker bridge gateway
      # (172.20.0.1), not saltierpoop 192.168.6.243. Keep the old
      # saltbox range and the LAN range for a later direct path.
      FORWARDED_ALLOW_IPS: "172.19.0.0/16,172.20.0.0/16,192.168.6.0/24"
    cpus: "12.0"
    mem_limit: 6g
    # The image clamps GALLERY_WORKERS at 8. This bind raises that
    # ceiling to 10. The Prawns share is read-only, so the patch stays
    # on the PC.
    volumes:
      - type: bind
        source: /home/someone/nocturne-drain-library.py
        target: /app/library.py
        read_only: true
