Add Docker Compose setup for web chat and email worker

Two services sharing a single image:
- web: Chainlit chat interface on port 8000
- email-worker: IMAP polling agent (main.py)

./data is mounted for persistent storage (registrations + conversations).
./openspec is mounted read-only so knowledge-base markdown files can be
edited on the host without rebuilding the image.

Configuration via .env (see .env.example).

https://claude.ai/code/session_015tJePX9eyQENYpJUF8XvvK
This commit is contained in:
Claude
2026-02-26 16:31:11 +00:00
parent 52901dd7c4
commit 6866d126cb
3 changed files with 68 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
services:
# Web chat interface — Chainlit served at http://localhost:8000
web:
build: .
command: chainlit run chat_app.py --host 0.0.0.0 --port 8000
ports:
- "8000:8000"
env_file: .env
volumes:
# Persistent storage for conversations and completed registrations
- ./data:/app/data
# Knowledge-base markdown files — edit on the host, no rebuild needed
- ./openspec:/app/openspec:ro
restart: unless-stopped
# Email polling agent — checks the inbox every POLL_INTERVAL seconds
email-worker:
build: .
command: python main.py
env_file: .env
volumes:
# Shares the same data directory as the web service
- ./data:/app/data
- ./openspec:/app/openspec:ro
restart: unless-stopped