Skip to content

refactor(deploy): move frontend delivery to GHCR and simplify compose workflow - #108

Merged
brokermr810 merged 5 commits into
OpenByteInc:mainfrom
hang666:refactor/frontend-delivery-pipeline
May 17, 2026
Merged

brokermr810 merged 5 commits into
OpenByteInc:mainfrom
hang666:refactor/frontend-delivery-pipeline

Conversation

@hang666

@hang666 hang666 commented May 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • remove the bundled frontend/ dist artifacts and old sync/build scripts from this repo
  • switch deployment to consume the frontend image published from QuantDinger-Vue
  • add GitHub Release automation for tagged releases
  • support optional BACKEND_TAG and FRONTEND_TAG overrides in compose
  • allow local frontend source builds directly from docker-compose.yml

Why

This refactor moves frontend delivery out of the backend repo and into the dedicated Vue repo, which makes releases cleaner and reduces duplicated packaging logic.

It also keeps local development practical by allowing the frontend to be built from source when needed, while preserving the default GHCR-based deployment flow.

Notes

  • default deployment now pulls the frontend image from GHCR
  • per-service tag overrides are optional; IMAGE_TAG remains the default shared control
  • docs and compose examples were updated to match the new delivery flow

hang666 added 5 commits May 17, 2026 02:27
The Vue source lives in the private QuantDinger-Vue repo, which now
publishes ghcr.io/brokermr810/quantdinger-frontend on every v* tag.
Consuming that image directly removes ~21 MB of build artefacts and
44 dist-touching commits from this repo's history going forward.

- docker-compose.yml: frontend service switches from build: to
  image: ${FRONTEND_IMAGE:-ghcr.io/brokermr810/quantdinger-frontend}.
- Remove frontend/ (dist/, dist.zip, Dockerfile, nginx.conf.template,
  railway.json) — superseded by the published image.
- Remove scripts/build-frontend.{sh,ps1} and
  scripts/private-frontend-ci.yml.example — manual dist-sync flow gone.
- .github/workflows/docker-publish.yml: drop the frontend job; the
  Vue repo's release-frontend.yml owns that path now.
- Delete .github/workflows/update-frontend.yml (auto-sync no longer needed).
- .github/workflows/basic-ci.yml: drop the frontend-check job that
  asserted frontend/dist existed.
- .gitignore / .dockerignore: clean up the dist-allowlist exceptions.
- Docs (README, CONTRIBUTING, DEVELOPMENT, docs/README_*.md,
  docs/CLOUD_DEPLOYMENT_*.md, docs/FRONTEND_FAST_ANALYSIS.md):
  rewrite the "npm run build -> replace frontend/dist" narrative as
  "tag v* -> auto-publish to GHCR".
After pushing the backend image to GHCR, action-gh-release@v2 publishes
a Release with GitHub-generated changelog and a pull snippet. Tag pushes
only — workflow_dispatch still produces just a short-SHA image. Bumps
`contents` permission to write.
When a Release is drafted through the GitHub web UI before the tag is
pushed, the workflow would silently overwrite the hand-written
changelog. Set append_body: true so the workflow body is appended after
existing notes instead of replacing them.
IMAGE_TAG remains the primary, lockstep knob — set it once and both
images move together. The new BACKEND_TAG / FRONTEND_TAG variables are
opt-in escape hatches for cases like "pin a frontend hotfix against
the stable backend". Whichever side is not overridden still follows
IMAGE_TAG, so the common case stays a single var.

Resolution order: BACKEND_TAG / FRONTEND_TAG > IMAGE_TAG > latest.

Both docker-compose.yml and docker-compose.ghcr.yml now use nested
defaults (`${SIDE_TAG:-${IMAGE_TAG:-latest}}`) so compose config
resolves correctly in all four scenarios (no env / IMAGE_TAG only /
both per-side / mixed). Verified via `docker compose config`.

Docs synced: README.md, docs/README_CN/AR/JA/KO/TH/VI.md, DEVELOPMENT.md,
CONTRIBUTING.md, CLOUD_DEPLOYMENT_{CN,EN}.md, .env.example.
The frontend service now declares both `image:` (default: pull from
GHCR) and `build:` (default context: ./QuantDinger-Vue). Compose
evaluates the build context lazily, so users who only pull never need
the source directory to exist — `docker compose up` still works
unchanged. Developers who want to iterate on Vue source clone the
private repo into the gitignored ./QuantDinger-Vue/ slot and add
--build:

    git clone https://github.com/brokermr810/QuantDinger-Vue.git QuantDinger-Vue
    docker compose up -d --build

This replaces the docker-compose.frontend-src.yml override approach
proposed earlier — one compose file, one command, no -f stacking.

- docker-compose.yml: dual image+build declaration; FRONTEND_SRC_PATH
  overrides the default ./QuantDinger-Vue path.
- .gitignore: add /QuantDinger-Vue/ alongside the existing entries.
- README.md / docs/README_CN.md: rewrite the "Alternative: build from
  Vue source" section around the new flow; CN drops the stale
  frontend/ entry from the directory tree.
- DEVELOPMENT.md / CONTRIBUTING.md: updated path + cross-reference.
- docs/README_{AR,JA,KO,TH,VI}.md: each quick-start gains a one-line
  pointer to the local-build flow linking back to the canonical EN README.
@brokermr810
brokermr810 merged commit 6be162d into OpenByteInc:main May 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants