Files
code_of_conquest_dnd/docker-compose.yml
Phillip Tarrant f18d306059 fix(api): package api/prompts into the Docker image
The narrator pipeline (M1) reads role prompts from /app/prompts, but the
Dockerfile copied only api/app and docs/schemas — never api/prompts — so
/dm/narrate 500'd with FileNotFoundError on narrator.md in any Docker run.
The M1 live smoke passed only because it ran uvicorn from the local venv,
where ../prompts resolves on the host; the container path was never
exercised until the client HTTP loop drove a real request through compose.

Dockerfile now COPYs api/prompts; compose mounts it :ro so prompt edits
reload live like the app code (prompts are source code, §16). Verified by
building the image and confirming /app/prompts/narrator.md is present.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 10:29:08 -05:00

25 lines
813 B
YAML

# Local dev — run the proxy in Docker with live reload.
# docker compose up --build
# Build context is the repo root so docs/schemas is available to the image.
# Ollama runs on the homelab (charter §4), not here — point OLLAMA_BASE_URL at it.
services:
api:
build:
context: .
dockerfile: api/Dockerfile
ports:
- "8000:8000"
env_file:
- path: ./api/.env
required: false
environment:
PORT: 8000
# Mount source + prompts + schemas so edits are live without a rebuild.
# Prompts are source code (§16) — editing a prompt should reload like code.
volumes:
- ./api/app:/app/app:ro
- ./api/prompts:/app/prompts:ro
- ./docs/schemas:/app/schemas:ro
command: >
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload