Skip to content

Add production Docker image packaging and GHCR release workflows - #23

Merged
ks6088ts merged 4 commits into
mainfrom
copilot/nginx-docker
Jun 13, 2026
Merged

Add production Docker image packaging and GHCR release workflows#23
ks6088ts merged 4 commits into
mainfrom
copilot/nginx-docker

Conversation

Copilot AI commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

This adds a production container path for the Vite-built SPA without changing the existing release.yaml asset release flow. The repository can now build an nginx image locally, validate Docker packaging in CI, and publish multi-arch images to GHCR on v* tags.

  • Production image packaging

    • Added docker/Dockerfile as a multi-stage build:
      • node:24.10.0-alpine + pnpm@10.33.0 to build dist
      • nginx:alpine runtime serving the built assets
    • Preserved the existing SPA fallback by reusing docker/nginx/default.conf
    • Added OCI metadata labels for revision, version, and source
    FROM node:24.10.0-alpine AS build
    WORKDIR /app
    RUN corepack enable && corepack prepare pnpm@10.33.0 --activate
    COPY package.json pnpm-lock.yaml ./
    RUN pnpm install --frozen-lockfile
    COPY . .
    RUN pnpm build
    
    FROM nginx:alpine
    COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
    COPY --from=build /app/dist /usr/share/nginx/html
  • Docker build inputs and local workflow

    • Added root .dockerignore to keep build context clean without excluding required app sources
    • Extended Makefile with:
      • docker-build
      • docker-run
      • docker-lint
      • docker-scan
      • ci-test-docker
  • CI and release automation

    • Added .github/workflows/docker.yaml for Docker-focused CI on main, feature/**, and PRs to main
    • Added .github/workflows/ghcr-release.yaml for GHCR-only multi-arch publish on v* tags
    • Kept the existing dist asset release workflow unchanged and coexisting
  • Compose integration

    • Updated docker/compose.yaml so web builds from:
      • context: ..
      • dockerfile: docker/Dockerfile
  • Documentation

    • Added docker / ghcr badges to README.md
    • Documented local image build/run, compose usage, and GHCR release behavior

Copilot AI changed the title [WIP] Add Docker image build with bundled assets for nginx Add production Docker image packaging and GHCR release workflows Jun 13, 2026
Copilot AI requested a review from ks6088ts June 13, 2026 08:27
@ks6088ts
ks6088ts marked this pull request as ready for review June 13, 2026 08:28
@ks6088ts
ks6088ts merged commit c0640d3 into main Jun 13, 2026
3 checks passed
@ks6088ts
ks6088ts deleted the copilot/nginx-docker branch June 13, 2026 08:39
@ks6088ts
ks6088ts restored the copilot/nginx-docker branch June 13, 2026 08:39
@ks6088ts
ks6088ts deleted the copilot/nginx-docker branch June 13, 2026 08:39
@ks6088ts

Copy link
Copy Markdown
Owner

fixes #22

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