feat: unify on single repo-root compose file for dev and prod
This commit is contained in:
parent
9acdbaa453
commit
af993bd43f
18 changed files with 253 additions and 229 deletions
20
AGENTS.md
20
AGENTS.md
|
|
@ -13,6 +13,26 @@ Backend (run from `backend/`):
|
|||
|
||||
Frontend (run from `frontend/`): `npm install`, `npm run dev`, `npm run build` (typecheck + build).
|
||||
|
||||
## Multi-container ops
|
||||
|
||||
One `docker-compose.yml` at the repo root for dev and prod. Dev specifics
|
||||
live in `.devcontainer/devcontainer.json` only — never add dev-only services,
|
||||
profiles, or override files. Containers: `api` (FastAPI :8000, attached),
|
||||
`frontend` (Vite :3000), `langflow` (:7860), `lfx` (:6004), `watchtower`
|
||||
(prod only, not in `runServices`).
|
||||
|
||||
- Backend suite (attached container, from `backend/`): `uv run pytest`.
|
||||
- Frontend build (node lives in `frontend`, reach it via exec from the repo
|
||||
root): `docker compose exec frontend npm run build`. Fallback without a
|
||||
docker socket: VS Code "Attach to Running Container" → frontend.
|
||||
- Logs/restart: `docker compose logs -f <service>`, `docker compose restart api`.
|
||||
- If `exec` misses the project, find it via `docker compose ls`.
|
||||
- CI runs on Forgejo (`.forgejo/workflows/`): backend pytest, frontend
|
||||
build, compose validation. Needs a Runner with the `docker` label online.
|
||||
- Prod: own `.env` with secrets + `FRONTEND_MODE=preview`; code updates via
|
||||
`git pull` + restart, image rebuilds only for dependency changes
|
||||
(`docker compose up -d --build`).
|
||||
|
||||
## Definition of done
|
||||
|
||||
- New behavior has tests; `uv run pytest` is green before reporting completion.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue