mirror of
https://github.com/reconurge/flowsint.git
synced 2026-07-11 13:35:22 -05:00
[PR #175] [MERGED] fix(deploy): serve prod from pre-built images #3433
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/reconurge/flowsint/pull/175
Author: @dextmorgn
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/5/2026
Merged by: @dextmorgn
Base:
main← Head:fix/prebuilt-images-compose📝 Commits (1)
82925befix(deploy): serve prod from pre-built images📊 Changes
10 files changed (+96 additions, -70 deletions)
View changed files
📝
.env.example(+3 -1)📝
Makefile(+14 -43)📝
README.md(+38 -2)📝
docker-compose.prod.yml(+14 -18)📝
flowsint-app/Dockerfile(+3 -2)📝
flowsint-app/nginx.conf(+20 -0)📝
flowsint-app/src/api/api.ts(+1 -1)📝
flowsint-app/src/api/chat-transport.ts(+1 -1)📝
flowsint-app/src/hooks/use-events.ts(+1 -1)📝
flowsint-app/src/hooks/use-graph-refresh.ts(+1 -1)📄 Description
Problem
docker-compose.prod.ymlbuilt everything from source and never used the images published byimages.yml. Worse, the frontend bakedVITE_API_URLinto the JS bundle at build time, so the publishedflowsint-appimage pointed at whatever URL CI had at build — "fail to fetch" for any other deployment. A pre-built image with a hardcoded API URL is a structural contradiction.Fix
Same-origin by design:
VITE_API_URLdefaults to""→ bundle calls relative/api/...URLs (all API routes already carry the/apiprefix)/api/to theapiservice over the Docker network (request-time DNS resolution, SSE support viaproxy_buffering off)?? ''guard onimport.meta.env.VITE_API_URLkills theundefined/api/...bug classImage-based compose:
docker-compose.prod.ymlusesghcr.io/reconurge/flowsint-{app,api}:${FLOWSINT_VERSION:-latest}, nobuild:sections127.0.0.1— only5173faces the network (default redis has no password, postgres ships default creds)Housekeeping:
make prodpulls instead of building; removed deaddeploytargets referencing nonexistentdocker-compose.deploy.ymlVerification
docker compose -f docker-compose.prod.yml config✓nginx -ton the new config ✓GET /api/typesthrough the proxy → FastAPI401,POST /api/auth/token→ FastAPI422validation (method + body traverse), SSE route reachable, no host baked in the bundle ✓Note
Requires a new tag (
v1.2.10) after merge: current ghcr:latestfrontend predates this fix and still ships the broken baked-URL bundle.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.