Skip to content

Self-hosting: Docker image on GHCR - #1

Merged
mannes merged 1 commit into
mainfrom
self-host
Sep 24, 2026
Merged

mannes merged 1 commit into
mainfrom
self-host

Conversation

@mannes

@mannes mannes commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Makes Bikefit easy to self-host. Same shape as libreble/brushlog#1 and libreble/collet#1, minus the base-path change: Bikefit already builds with base: './', so dist/ runs from any path.

  • Dockerfile — Node 22 + corepack pnpm build → nginx-unprivileged on :8080, app at / (or --build-arg BASE_PATH=/bikefit/). no-cache for index/sw/manifest, immutable /assets/, /healthz.
  • .github/workflows/docker.yml — pushes ghcr.io/libreble/bikefit (amd64+arm64) with GITHUB_TOKEN on main / v* tags. PRs build + run docker/smoke.sh only.
  • README — ## Self-host (docker run, compose, static build, HTTPS caveat).
  • SEO — <noscript> description.

Local: both images pass the smoke test. No app code changed.

After the first push to main: set the GHCR package to Public.

- Dockerfile: pnpm build stage + unprivileged nginx on :8080, served at / by
  default (--build-arg BASE_PATH=/bikefit/ for a subpath; the build itself
  is path-relative). no-cache on index/sw/manifest, immutable assets, /healthz.
- docker.yml: publishes ghcr.io/libreble/bikefit (amd64 + arm64) with
  GITHUB_TOKEN on main and v* tags; PRs build and run docker/smoke.sh.
- README: Self-host section. index.html: <noscript> description.
@mannes
mannes merged commit 653db45 into main Sep 24, 2026
1 check passed
@mannes
mannes deleted the self-host branch September 24, 2026 06:25
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.

1 participant