Files
talemate/docker-compose.yml
David Gibbons 942756937a Feature/runtime websocket config (#244)
* fix(docker): use explicit directory paths in COPY commands

The previous COPY command copied the contents of scenes and templates
directly into /app/ instead of preserving the directory structure.
This change ensures each directory is copied as a subdirectory:

- scenes/ -> /app/scenes/
- templates/ -> /app/templates/
- chroma* -> /app/ (glob pattern, unchanged)

* feat(frontend): add vite-plugin-runtime-env for runtime configuration
feat(docker): add entrypoint for runtime environment substitution
chore(docker): add WebSocket URL env var to compose files
docs: add runtime WebSocket configuration documentation

Add vite-plugin-runtime-env to enable runtime environment variable
configuration. This plugin rewrites import.meta.env.VITE_* references
to window.env.VITE_* at build time and injects placeholders into
index.html that can be substituted at container startup using envsubst.

This enables configuring VITE_TALEMATE_BACKEND_WEBSOCKET_URL at
container runtime without rebuilding the Docker image.

Add docker-entrypoint.sh that uses envsubst to replace environment
variable placeholders in index.html at container startup.

Update troubleshoot.md:
- Add section on configuring WebSocket URL at runtime
- Replace placeholder reverse proxy section with actual working instructions
- Add nginx WebSocket proxy configuration example

Update change-host-and-port.md:
- Add Docker runtime configuration section
- Document configuration priority (runtime env var vs auto-detection)

* chore(Dockerfile): add copy command for tts directory to include text-to-speech functionality
2026-01-16 12:57:36 +02:00

19 lines
669 B
YAML

version: '3.8'
services:
talemate:
image: ghcr.io/vegu-ai/talemate:latest
ports:
- "${FRONTEND_PORT:-8080}:8080"
- "${BACKEND_PORT:-5050}:5050"
volumes:
- ./config.yaml:/app/config.yaml
- ./scenes:/app/scenes
- ./templates:/app/templates
- ./chroma:/app/chroma
- ./tts:/app/tts
environment:
- PYTHONUNBUFFERED=1
- PYTHONPATH=/app/src:$PYTHONPATH
- VITE_TALEMATE_BACKEND_WEBSOCKET_URL=${VITE_TALEMATE_BACKEND_WEBSOCKET_URL:-}
command: ["uv", "run", "src/talemate/server/run.py", "runserver", "--host", "0.0.0.0", "--port", "5050", "--frontend-host", "0.0.0.0", "--frontend-port", "8080"]