Migrate CI to GitHub Actions + fix server Dockerfile bitrot#83
Merged
Conversation
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>
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>
There was a problem hiding this comment.
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
serverandweb-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-appmatrix 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 on lines
+8
to
+9
| contents: write | ||
| pull-requests: write |
| jobs: | ||
| build-test: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.pull_request.user.login == 'duluca' |
| - 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
serverandweb-app).server/Dockerfilethat prevent it from building on a clean modern Docker:apk add python→python3(Alpine renamed the package).ADD package.json/ADD dist→ use--chown=node:node(BuildKit's ADD runs as root regardless of USER, breakingnpm install).Test plan
serverandweb-appjobs to greenexpertlysimple/minimal-mean-serverandexpertlysimple/minimal-mean-web-appto Docker Hub🤖 Generated with Claude Code