Skip to content

Add Docker image and GHCR publish workflow#124

Open
tytremblay wants to merge 1 commit into
mainfrom
feat/docker-image
Open

Add Docker image and GHCR publish workflow#124
tytremblay wants to merge 1 commit into
mainfrom
feat/docker-image

Conversation

@tytremblay

Copy link
Copy Markdown
Collaborator

Why

hawk_suite is bundling the team's web apps into a self-hostable Docker Compose stack so any team can run them on a cheap VPS or a laptop in the pit. QRScout is the first app in the bundle, and that needs a container image.

What

  • Multi-stage Dockerfile — node 22 build → nginx static serve, with a /healthz endpoint and container healthcheck. A BASE_PATH build arg defaults to / for containers while GitHub Pages keeps /QRScout/.
  • .github/workflows/docker.yml — publishes ghcr.io/frc2713/qrscout on pushes to main and v* tags, for linux/amd64 and linux/arm64 (so the image runs on a Raspberry Pi in the pit). PRs touching the docker files get a build-only check.
  • Base-path fixesindex.html had /QRScout/ hardcoded in favicon/manifest links; these are now Vite's %BASE_URL% placeholder. manifest.json scope/start_url are now relative (./), which resolves identically under both deployments.

Teams using the container can mount their scouting config at /usr/share/nginx/html/team-config.json and load it in the app from https://<host>/team-config.json — no code change needed.

Verification

Ran both builds locally and checked the output:

  • npm run build (default): dist/index.html still references /QRScout/... — GitHub Pages unaffected.
  • npm run build -- --base=/: output is fully root-relative, zero /QRScout/ references.

The image itself will get its first real build from the workflow's PR check on this PR.

🤖 Generated with Claude Code

Multi-stage build (node -> nginx) with a BASE_PATH build arg: GitHub
Pages keeps /QRScout/ as the default, the image builds with /. Hardcoded
/QRScout/ paths in index.html become %BASE_URL% and the PWA manifest
uses relative scope/start_url so both deployments work.

The workflow publishes linux/amd64 + linux/arm64 (Raspberry Pi) images
to ghcr.io on pushes to main and version tags.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://FRC2713.github.io/QRScout/pr-preview/pr-124/

Built to branch gh-pages at 2026-07-05 23:42 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

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