Skip to content

Fix#21

Merged
emirenesakalin merged 5 commits intodevfrom
fix
Sep 24, 2025
Merged

Fix#21
emirenesakalin merged 5 commits intodevfrom
fix

Conversation

@emirenesakalin
Copy link
Contributor

No description provided.

This change upgrades the Node.js version used in the CI/CD pipeline from 18 to 22.

This ensures compatibility with the latest dependencies and leverages any performance improvements or new features offered by Node.js 22.
Separates the frontend and backend into distinct Docker images and updates the CI/CD pipeline to build and push these images
individually.
The Kubernetes deployment configuration is also updated to deploy both images. This allows for independent scaling and deployment of the frontend and backend.
Copilot AI review requested due to automatic review settings September 24, 2025 13:22
@emirenesakalin emirenesakalin self-assigned this Sep 24, 2025
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 PR refactors the CI/CD pipeline to support separate frontend and backend deployments instead of a monolithic approach. The changes split the Docker image building process into frontend and backend components and update the Kubernetes deployment accordingly.

  • Split the single Docker build job into separate frontend and backend build jobs
  • Updated Kubernetes deployment to use two containers instead of one
  • Upgraded Node.js version from 18 to 22 in the CI pipeline

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
kubernetes/deployment.yaml Updated to deploy separate frontend and backend containers with distinct image variables
.github/workflows/ci-cd.yml Split Docker build process into separate jobs for frontend and backend, updated Node.js version

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 24, 2025 13:36
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 2 out of 3 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +52 to +60
- image: ${FRONTEND_IMAGE}
name: mentora-frontend
imagePullPolicy: Always
ports:
- containerPort: 80
env:
# Add frontend environment variables here if needed
- name: NODE_ENV
value: "production"
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

Running both frontend and backend containers in the same pod violates Kubernetes best practices. Each service should have its own deployment for independent scaling, updates, and resource management. Consider creating separate deployments for frontend and backend services.

Copilot uses AI. Check for mistakes.
This commit separates the application into distinct frontend and backend deployments.

- Creates a new `mentora-frontend` service and deployment, serving static assets on port 80.
- Configures resource requests and limits, liveness and readiness probes for the `mentora-backend` deployment.
- Sets `NODE_ENV` to "production" for the backend.
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 2 out of 3 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

ports:
- containerPort: 80
env:
# Add frontend environment variables here if needed
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

This comment suggests incomplete configuration. Either remove the placeholder comment or add the necessary environment variables for the frontend.

Suggested change
# Add frontend environment variables here if needed

Copilot uses AI. Check for mistakes.
@emirenesakalin emirenesakalin merged commit ee8915b into dev Sep 24, 2025
5 checks passed
@emirenesakalin emirenesakalin deleted the fix branch September 24, 2025 13:48
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