Skip to content

Migrate CI to GitHub Actions + fix server Dockerfile bitrot#83

Merged
duluca merged 4 commits into
masterfrom
claude/migrate-to-github-actions
May 18, 2026
Merged

Migrate CI to GitHub Actions + fix server Dockerfile bitrot#83
duluca merged 4 commits into
masterfrom
claude/migrate-to-github-actions

Conversation

@duluca

@duluca duluca commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace CircleCI with GitHub Actions (matrix builds for server and web-app).
  • Fix two latent bugs in server/Dockerfile that prevent it from building on a clean modern Docker:
    • apk add pythonpython3 (Alpine renamed the package).
    • ADD package.json / ADD dist → use --chown=node:node (BuildKit's ADD runs as root regardless of USER, breaking npm install).

Test plan

  • CI matrix runs both server and web-app jobs to green
  • Smoke test passes for both
  • Endpoint checks pass for both
  • Auto-merge squash-merges
  • publish.yml pushes both expertlysimple/minimal-mean-server and expertlysimple/minimal-mean-web-app to Docker Hub

🤖 Generated with Claude Code

duluca and others added 3 commits May 18, 2026 02:05
CI changes:
- Add .github/workflows/ci.yml — matrix build for server/ and web-app/.
  Each subdir: build image, smoke test (container stays up), endpoint
  check ('Server is up and running' / 'Minimal MEAN Web App'). On green,
  auto-merge via PAT.
- Add .github/workflows/publish.yml — matrix push to Docker Hub on push
  to default branch (expertlysimple/minimal-mean-server and
  expertlysimple/minimal-mean-web-app).
- Remove .circleci/.

server/Dockerfile fixes (image fails to build on a clean modern Docker
without these):
- apk add 'python' was renamed to 'python3' in modern Alpine.
- ADD package*.json and ADD dist now use --chown=node:node so files
  are writable by the 'node' user; BuildKit's ADD/COPY runs as root by
  default regardless of USER, which broke 'npm install'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dist/ is gitignored, so CI checkouts have no compiled output to COPY.
Run setup-node@v4 with Node 12, then npm install --legacy-peer-deps and
npm run build for each subdir before docker build. Mirror the steps in
publish.yml so on-main builds also produce fresh artifacts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The server's index.ts awaits document.connect(mongoUri) before
calling listen(). Without mongo, the connect promise pends until the
30s server-selection timeout fires, which is longer than our test
window. Start a mongo:5 container on a dedicated docker network and
point the test container's MONGO_URI at it.

Bumped curl retry to 10 attempts and added 'docker logs' on endpoint
failure to surface root causes in future debugging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@duluca
duluca requested a review from Copilot May 18, 2026 06:17
Branch protection on master requires 'ci/circleci: build', which is now
permanently pending since we removed the CircleCI config. enforce_admins
is false, so admin bypass is available. Long-term fix is to update the
branch protection rules to require the new GH Actions checks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@duluca
duluca merged commit 95c8899 into master May 18, 2026
5 of 6 checks passed
@duluca
duluca deleted the claude/migrate-to-github-actions branch May 18, 2026 06:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Migrates the project’s CI/CD from CircleCI to GitHub Actions, adds Docker Hub publishing for server and web-app images, and updates the server Dockerfile for modern Alpine/Docker behavior.

Changes:

  • Adds GitHub Actions CI matrix for server and web-app.
  • Adds Docker Hub publish workflow on main/master.
  • Removes CircleCI configs and fixes server Dockerfile package/ownership issues.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
server/Dockerfile Updates Alpine Python package and file ownership for app assets.
.github/workflows/ci.yml Adds PR build, Docker smoke, endpoint checks, and auto-merge job.
.github/workflows/publish.yml Adds Docker Hub build-and-push workflow for both images.
.circleci/config.yml Removes legacy CircleCI build/test workflow.
.circleci/config.aws.yml Removes legacy CircleCI AWS publishing workflow.
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:44

  • For the web-app matrix entry this only runs the default Angular build, while the existing root and Docker scripts use a production build (--prod/build:prod). CI will therefore validate a non-production bundle and can miss failures or behavior differences in the artifact intended for Docker deployment.
      - name: npm run build
        working-directory: ${{ matrix.subdir }}
        run: npm run build

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +8 to +9
contents: write
pull-requests: write
Comment thread .github/workflows/ci.yml
jobs:
build-test:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'duluca'
Comment thread .github/workflows/ci.yml
- name: npm install
working-directory: ${{ matrix.subdir }}
run: npm install --legacy-peer-deps --no-audit --no-fund

Comment on lines +34 to +36
- name: npm run build
working-directory: ${{ matrix.subdir }}
run: npm run build
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