Skip to content

Docker Workflow update#75

Merged
ritwikshanker merged 10 commits intomainfrom
v0.5.x
Feb 23, 2026
Merged

Docker Workflow update#75
ritwikshanker merged 10 commits intomainfrom
v0.5.x

Conversation

@ritwikshanker
Copy link
Collaborator

This pull request updates the Docker build and deployment workflow, improves Docker image tagging, and adjusts the production startup commands for the frontend service. The main goals are to streamline Docker image publishing based on tags, enhance metadata handling, and ensure the production environment uses the correct process manager.

Workflow and Docker image publishing improvements:

  • The GitHub Actions workflow .github/workflows/docker-publish.yml is now triggered on new version tags (matching v*.*.*) instead of every push to main, ensuring Docker images are only built and published for releases.
  • Switched from manually extracting the version from package.json to using the docker/metadata-action, which automatically handles image tagging (including latest, full semver, and major.minor tags) and metadata extraction.
  • Updated the Docker build and push step to use docker/build-push-action@v6 and to apply tags and labels generated by the metadata action, improving consistency and automation in image publishing.

Production startup and development workflow changes:

  • In docker-compose.yml, the frontend service now uses npm run prod as its command, ensuring the service starts in production mode using the correct process manager.
  • Added a new prod script to package.json that uses pm2-runtime to run the production server with clustering, replacing the previous cluster script.
  • Added a postversion script to package.json to automatically push commits and tags after version bumps, supporting a smoother release workflow.

@ritwikshanker ritwikshanker self-assigned this Feb 23, 2026
Copilot AI review requested due to automatic review settings February 23, 2026 06:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request modernizes the Docker workflow to use tag-based publishing instead of branch-based publishing, and updates the production deployment to use PM2 clustering via docker-compose. The changes align the release process with semantic versioning practices and ensure production deployments use process management for better reliability.

Changes:

  • GitHub Actions workflow now triggers on version tags (v*.*.*) instead of every push to main, using docker/metadata-action for automated semver tagging
  • Added prod script to package.json using pm2-runtime for clustered production deployment
  • Added postversion script to automatically push version commits and tags after version bumps
  • Updated docker-compose.yml to use the new prod script for production startup

Reviewed changes

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

File Description
.github/workflows/docker-publish.yml Switched from branch-based to tag-based Docker publishing, upgraded to docker/build-push-action@v6, and implemented docker/metadata-action for automatic semver tagging
package.json Added prod script with pm2-runtime clustering and postversion hook for automatic git push
docker-compose.yml Changed frontend service command to use npm run prod for production deployment with PM2

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

@ritwikshanker ritwikshanker merged commit f2cae66 into main Feb 23, 2026
8 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


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

Comment on lines +31 to +48
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/eosc-data-commons/matchmaker-frontend
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/eosc-data-commons/matchmaker-frontend:latest
ghcr.io/eosc-data-commons/matchmaker-frontend:${{ steps.get_version.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

workflow_dispatch can run this workflow on a branch ref, but the metadata action is configured to generate tags only from semver tags (and latest is explicitly disabled on non-tag refs). In that scenario steps.meta.outputs.tags will be empty and the build/push step will fail (or push nothing). Consider either removing workflow_dispatch, or adding a non-tag fallback tag (e.g., sha/ref-based) and/or guarding the push step so it only runs for tag refs.

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +66
"eslint": "^9.19.0",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.0",
"globals": "^17.3.0",
"tailwindcss": "^4.1.17",
"tsx": "^4.21.0",
"typescript": "~5.9.3",
"typescript-eslint": "^8.55.0",
"typescript-eslint": "^8.36.0",
"vite": "7.3.1"
},
"overrides": {
"minimatch": "^10.2.1"
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

This PR is described as a Docker workflow/startup change, but this hunk also changes lint tooling versions and adds an overrides entry (which cascades into a large package-lock.json update). If those dependency/tooling changes are intentional, they should be called out explicitly in the PR description/changelog; otherwise consider reverting them or splitting them into a separate PR to keep the release-focused Docker changes isolated.

Copilot uses AI. Check for mistakes.
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.

3 participants