Skip to content

feat: Container release via Docker + GitHub Actions#49

Merged
pmcfadin merged 2 commits intomainfrom
issue-48
Feb 9, 2026
Merged

feat: Container release via Docker + GitHub Actions#49
pmcfadin merged 2 commits intomainfrom
issue-48

Conversation

@pmcfadin
Copy link
Contributor

@pmcfadin pmcfadin commented Feb 9, 2026

Summary

  • Add multi-stage Dockerfile (node:22-alpine build → nginx:alpine serve, ~45-55 MB final image)
  • Add nginx config template with SPA routing, API reverse proxy (${API_BACKEND_URL}), cache headers (immutable for hashed assets, no-cache for index.html), and gzip
  • Add GitHub Actions workflow that builds and pushes to ghcr.io/killrvideo/killrvideo-react-frontend on push to main (tags: latest + sha-<short>) and semver tags (tags: 1.2.3, 1.2, 1)
  • Add .dockerignore to keep build context small

Closes #48

Usage

# Run locally
docker build -t killrvideo-frontend .
docker run --rm -p 8080:8080 -e API_BACKEND_URL=http://host.docker.internal:8443 killrvideo-frontend

# Cut a release
git tag v1.0.0 && git push origin v1.0.0

# Pull from registry
docker pull ghcr.io/killrvideo/killrvideo-react-frontend:latest

Test plan

  • Docker build completes successfully (will be validated by GHA workflow on merge)
  • SPA routing works — non-root paths serve index.html
  • /assets/* returns Cache-Control: public, immutable
  • / returns Cache-Control: no-cache
  • API requests to /api/ are proxied to API_BACKEND_URL
  • Final image is ~45-55 MB
  • GitHub Actions workflow runs on push to main and publishes to ghcr.io

Note

First-time ghcr.io setup: after the workflow's first run, an org admin needs to set package visibility in GitHub package settings.

🤖 Generated with Claude Code

Multi-stage Docker build (node:22-alpine + nginx:alpine) with nginx
reverse proxy for SPA routing and API pass-through. GitHub Actions
workflow publishes to ghcr.io on push to main and semver tags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Build-only (no push) on pull_request events so the Dockerfile is
tested in CI before merging to main.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Collaborator

@aar0np aar0np left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Glad to see a production-level Docker container.

@pmcfadin pmcfadin merged commit d1d3058 into main Feb 9, 2026
3 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.

feat: Container release via GitHub Actions + ghcr.io

2 participants