feat(infra): add frontend service to compose for one-command local stack - #216
Closed
parthrohit22 wants to merge 1 commit into
Closed
feat(infra): add frontend service to compose for one-command local stack#216parthrohit22 wants to merge 1 commit into
parthrohit22 wants to merge 1 commit into
Conversation
- New apps/frontend/Dockerfile runs the Vite dev server (binds 0.0.0.0:5173). - docker-compose.yml now includes a 'frontend' service on the internal 'data' network, reaching the API via its service name (VITE_API_URL= http://api:8000). Source is mounted for hot reload. - 'npm run docker:up' now boots api + postgres + redis + frontend together, so local dev no longer needs a separate terminal for the frontend. - README updated to document the one-command stack. Verified: 'npm run docker:config' validates; frontend service resolves in the composed config. Live boot (docker:up + localhost:5173) is the operator's run step.
Collaborator
Author
|
Reverting per owner decision; one-command compose stack to be re-planned later. |
This was referenced Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
frontendservice to the Compose stack sonpm run docker:upboots the entire local environment — API + PostgreSQL + Redis + frontend dev server — in one command. Previously the frontend had to be run in a separate terminal; this closes that gap.Builds on the #214 hardening (data tier is host-isolated on the internal
datanetwork); the frontend service joins that samedatanetwork and reaches the API by its compose service name, not localhost.Linked issue
Related to #214 (infra hardening / self-hosted operability, W7). No dedicated issue; this is a developer-experience follow-on to the Compose work.
Roadmap alignment
npm run docker:configvalidates the composed file; thefrontendservice resolves in the generated config with correct build context, dependency onapi, anddatanetwork membership.What changed
apps/frontend/Dockerfile(new): Node 20 image, installs deps, runsvite --host 0.0.0.0 --port 5173, setsVITE_API_URL=http://api:8000.docker-compose.yml: addedfrontendservice — published5173:5173, source mounted for hot reload (with/app/node_modulespreserved),depends_on: api, ondatanetwork.README.md: documented the one-command stack and keptnpm run dev:frontendas the out-of-Compose alternative.Acceptance criteria completed
npm run docker:upstarts api + postgres + redis + frontend together.http://localhost:5173from the host.npm run docker:configvalidates; service resolves.Testing performed
Live boot (
npm run docker:up, then open http://localhost:5173) is the operator's verification step and was not executed here to avoid a multi-minute image build; the config-level checks pass.Screenshots
Not applicable (infra change).
Security and data considerations
datanetwork only; it does not expose the datastore. Postgres/Redis remain host-isolated per security(infra): harden compose exposure and split pytest out of runtime deps (#185, #186, #187) #214.Dependencies and blocked work
None.
Scope changes or remaining work
None. The backend image build and Postgres/Redis host isolation from #214 are unchanged.
Contributor checklist
devupstream/devCloses) is used only because the issue is fully resolved