# Restore In-Repo Nginx Design **Goal:** Restore the repository-managed Nginx entrypoint on `dev` by writing back the earlier removal diff, so frontend static hosting and backend API proxying return to a single same-origin entry. **Decisions** - Restore `nginx/nginx.conf` and `nginx/Dockerfile` from the pre-removal topology. - Replace the `frontend` runtime service in `docker-compose.yaml` with an `nginx` service that serves the built SPA and proxies `/api` and `/health` to `backend`. - Remove the Caddy-specific runtime file because the repository will no longer use a separate frontend web server. - Keep later non-nginx fixes that remain valid, especially the frontend API base URL fallback logic for optional local direct access. **Architecture** - `db` remains unchanged. - `backend` remains unchanged and is reachable internally on `backend:8000`. - `nginx` becomes the public entrypoint again, serving the frontend bundle and reverse proxying API traffic to `backend`. - The browser returns to same-origin access through the Nginx entrypoint. **Operational Notes** - This is an in-place restoration based on the previous removal footprint, not a fresh redesign. - The current Tencent Cloud/private registry removal remains intact and is not being reintroduced.