32 lines
1.2 KiB
YAML
32 lines
1.2 KiB
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
|
|
# Reach a host-run Ollama from inside the container. On Linux, localhost in
|
|
# the container is the container itself, so OLLAMA_BASE_URL must be
|
|
# http://host.docker.internal:11434 (set in api/.env); this maps that name
|
|
# to the Docker host. Harmless when Ollama is on the homelab instead.
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
# 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
|
|
- ./content:/app/content:ro
|
|
command: >
|
|
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|