Skip to content

Mrc 6647 ci docker#11

Merged
absternator merged 27 commits intomainfrom
mrc-6647-ci-docker
Oct 10, 2025
Merged

Mrc 6647 ci docker#11
absternator merged 27 commits intomainfrom
mrc-6647-ci-docker

Conversation

@absternator
Copy link
Contributor

@absternator absternator commented Oct 8, 2025

The following PR sets up CI + Docker. It also adds a docker-compose file that can be used for testing.

Testing:
run FRONTEND_REF=mrc-6647-ci-docker docker compose up and head to 127.0.0.1:3000 and ensure everything works as intended

absternator and others added 20 commits October 7, 2025 10:50
… to README

fix: update mint-frontend service configuration in docker-compose.yml
- Added a new script "test:unit:coverage" to run unit tests with coverage using Vitest.
- Updated package.json to include "@vitest/coverage-v8" for coverage reporting.
@codecov
Copy link

codecov bot commented Oct 8, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

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 establishes a comprehensive CI/CD pipeline and Docker containerization setup for the Mint v2 application. The changes enable automated testing, building, and deployment through GitHub Actions workflows while providing Docker compose support for local development and testing.

Key changes include:

  • CI/CD pipeline setup with GitHub Actions for testing, building, and pushing Docker images
  • Docker containerization with multi-stage Dockerfile and docker-compose configuration
  • SvelteKit adapter migration from auto to node for containerized deployment

Reviewed Changes

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

Show a summary per file
File Description
svelte.config.js Switched from adapter-auto to adapter-node for Docker deployment
Dockerfile Multi-stage Node.js build with production optimization
compose.yml Docker compose setup with Redis, frontend, and API services
.github/workflows/* CI workflows for testing, E2E tests, and Docker image building
src/lib/url.ts Changed from static to dynamic environment variables
src/lib/server/redis.ts Updated Redis configuration for containerized environments
src/lib/server/session.ts Modified cookie sameSite policy for cross-origin compatibility
scripts/* Updated dependency management scripts for new container names
src/tests/* Fixed test cases to match current application structure
package.json Added Node adapter and coverage testing dependencies

httpOnly: true,
secure: true,
sameSite: 'lax',
sameSite: 'none',
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

Setting sameSite to 'none' requires the 'secure' flag to be true and can expose the application to CSRF attacks. Consider using 'lax' or 'strict' instead, or ensure this change is necessary for your specific cross-origin requirements.

Suggested change
sameSite: 'none',
sameSite: 'lax',

Copilot uses AI. Check for mistakes.
README.md Outdated
1. **Start services**:

```sh
docker-compose up -d
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The documentation references 'docker-compose.yml' but the actual file is named 'compose.yml'. The commands should use 'docker compose' (without hyphen) for the newer Docker Compose V2 syntax.

Copilot uses AI. Check for mistakes.
3. **Stop services**:

```sh
docker-compose down
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The documentation references 'docker-compose.yml' but the actual file is named 'compose.yml'. The commands should use 'docker compose' (without hyphen) for the newer Docker Compose V2 syntax.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@M-Kusumgar M-Kusumgar left a comment

Choose a reason for hiding this comment

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

got a couple of small comment! but looks good

Comment on lines +28 to +29
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this? i remember its been on the ci for packit i think, but i dont think we actually needed this right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cool have removed.. i just added because it was in the docker action docs

Comment on lines +14 to +15
matrix:
node-version: [22.x]
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need matrix if we are only testing against one version? or do we plan on testing against different versions? i dont think people usually test against different versions of npm

Comment on lines +88 to +90
```sh
docker-compose up
```
Copy link
Contributor

Choose a reason for hiding this comment

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

should we also include docker compose up --build to rebuild changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not anymore because im using the image from ghcr and not building locally

@absternator absternator requested a review from M-Kusumgar October 9, 2025 14:10
Base automatically changed from mrc-6774-strategise-display to main October 10, 2025 10:05
@absternator absternator merged commit cfab19c into main Oct 10, 2025
5 checks passed
@absternator absternator deleted the mrc-6647-ci-docker branch October 10, 2025 10:05
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