You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add optional Docker Compose dev stack and document it
Introduce docker-compose.yml with API (backend/Dockerfile), rundown-ui,
and prompter services; env vars live in .env.docker (from example).
Vite configs read DUOPUS_API_PROXY for the dev proxy target. Update
PHASE1.md and AGENTS.md: remove Docker from out-of-scope, explain why
Compose exists and how it relates to local dev.
Co-authored-by: Jakub Doboš <kubo6472@users.noreply.github.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
### Stack (Phase 1)
8
8
9
9
-**Backend:** Python 3.12, FastAPI, SQLModel, **SQLite** (`DATABASE_URL`). Dependencies and lockfile live under `backend/` (`pyproject.toml`, `uv.lock`). Schema is created with **`SQLModel.metadata.create_all`** (no Alembic in this phase).
10
-
-**Frontend:**`frontend/rundown-ui` and `frontend/prompter` — local dev with Vite (`npm run dev`). There is**no**Docker Compose or bundled nginx in Phase 1; run the API and Vite dev servers separately.
10
+
-**Frontend:**`frontend/rundown-ui` and `frontend/prompter` — local dev with Vite (`npm run dev`). For a**one-command dev/smoke-test stack**, use Docker Compose from the repo root (see below); otherwise run the API and Vite dev servers separately.
11
11
12
12
### Commands
13
13
@@ -26,6 +26,11 @@ After changing dependencies in `pyproject.toml`, run `uv lock` and commit `uv.lo
26
26
-`cd frontend/rundown-ui && npm install && npm run dev`
27
27
-`cd frontend/prompter && npm install && npm run dev` — prompter handoff view (`/prompter/:storyId`); polls the API as described in `docs/PHASE1.md`
28
28
29
+
**Docker Compose (optional, dev / smoke testing)**
30
+
31
+
- Copy `.env.docker.example` to `.env.docker` (gitignored) and set at least `SECRET_KEY`; add or change any API env vars there (same semantics as `.env` for the backend).
32
+
- From the repo root: `docker compose up --build` — builds `backend/Dockerfile`, runs API on **8000**, rundown UI on **5173**, prompter on **5174**. SQLite uses the `duopus-sqlite` volume; see `docs/PHASE1.md` for rationale and Vite proxy details (`DUOPUS_API_PROXY`).
33
+
29
34
### Default dev login
30
35
31
36
See **Seed data** in `docs/PHASE1.md` (admin user and password for local development).
- Auth beyond simple **session-based** login (FastAPI-Users with cookies; no JWT complexity)
@@ -211,10 +210,22 @@ Prompter polling (handoff to QPrompt): **`GET /api/prompter/{story_id}`** — la
211
210
212
211
---
213
212
214
-
## Running locally (no Docker)
213
+
## Running locally
214
+
215
+
### Without Docker (default)
215
216
216
217
1.**Backend:** from `backend/`, `uv sync --extra dev`, set `SECRET_KEY` (and optional `DATABASE_URL`), then `uv run uvicorn main:app --reload --host 0.0.0.0 --port 8000`.
217
218
2.**Rundown UI:**`frontend/rundown-ui` — `npm install` && `npm run dev` (Vite proxies `/api` to the backend per `vite.config`).
218
219
3.**Prompter:**`frontend/prompter` — `npm run dev` on a second port if needed; configure API origin as in Vite config.
219
220
220
221
`CORS_ORIGINS` in `.env` must include the Vite dev origin (e.g. `http://localhost:5173`).
222
+
223
+
### Optional Docker Compose (dev / smoke testing)
224
+
225
+
The repo includes a **non-production** Compose stack for manual testing: API on port **8000**, rundown UI on **5173**, prompter on **5174**. It is **not** part of the Phase 1 product scope beyond convenience for developers and agents; behaviour matches the local stack above.
226
+
227
+
1. Copy **`.env.docker.example`** to **`.env.docker`** (gitignored) and set **`SECRET_KEY`** and any other variables you need. All API-related env vars for the container are read from `.env.docker` so you can tune `DATABASE_URL`, `CORS_ORIGINS`, `ADMIN_PASSWORD`, etc., without touching the compose file.
228
+
2. From the repo root: **`docker compose up --build`**.
229
+
3. SQLite data is stored on the named volume **`duopus-sqlite`** (path inside the API container is whatever `DATABASE_URL` points to; the example uses `/data/duopus.db` on that volume).
230
+
231
+
Vite dev servers in Compose proxy `/api` to the **`api`** service via the **`DUOPUS_API_PROXY`** environment variable (`http://api:8000`). For local (non-Docker) Vite, the default proxy remains `http://127.0.0.1:8000`.
0 commit comments