# =============================================================================
#  Local testing override.
#
#  Use:
#    docker compose -f docker-compose.yml -f docker-compose.local.yml up --build
#
#  What this changes vs. production:
#    - Publishes the app on http://localhost:4321 (no nginx-proxy needed).
#    - Drops the VIRTUAL_HOST / LETSENCRYPT_HOST env vars.
#    - Maps the production `nginx-proxy` network reference to the local
#      `backend` network — local dev boxes here use `backend` (also external)
#      as their proxy network instead of jwilder's default `nginx-proxy` name.
#      If you don't have a local proxy at all, comment the networks: blocks
#      out and use `network_mode: "host"` (uncomment below) so the container
#      can reach Ollama on localhost:11434.
# =============================================================================

services:
  docs:
    ports:
      - "4321:4321"
    environment:
      VIRTUAL_HOST: ""
      VIRTUAL_PORT: ""
      LETSENCRYPT_HOST: ""
      LETSENCRYPT_EMAIL: ""
    # If you run Ollama on the same machine and have no proxy network, uncomment:
    # network_mode: "host"
    # And in your .env:
    # OLLAMA_BASE_URL=http://127.0.0.1:11434

# Compose merges these into the production file's `networks:` block. The
# `name:` override re-points the production reference (`nginx-proxy`) at
# whatever Docker network actually exists locally — here, `backend`.
networks:
  nginx-proxy:
    name: backend
    external: true
