Conversation
…actor Docker setup and remove unused routes
…ide/mint-v2 into mrc-6647-ci-docker
… to README fix: update mint-frontend service configuration in docker-compose.yml
…ADME with environment variable examples
- 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.
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 ☂️ |
There was a problem hiding this comment.
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 |
src/lib/server/session.ts
Outdated
| httpOnly: true, | ||
| secure: true, | ||
| sameSite: 'lax', | ||
| sameSite: 'none', |
There was a problem hiding this comment.
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.
| sameSite: 'none', | |
| sameSite: 'lax', |
README.md
Outdated
| 1. **Start services**: | ||
|
|
||
| ```sh | ||
| docker-compose up -d |
There was a problem hiding this comment.
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.
| 3. **Stop services**: | ||
|
|
||
| ```sh | ||
| docker-compose down |
There was a problem hiding this comment.
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.
M-Kusumgar
left a comment
There was a problem hiding this comment.
got a couple of small comment! but looks good
.github/workflows/build-push.yml
Outdated
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
cool have removed.. i just added because it was in the docker action docs
.github/workflows/test.yml
Outdated
| matrix: | ||
| node-version: [22.x] |
There was a problem hiding this comment.
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
| ```sh | ||
| docker-compose up | ||
| ``` |
There was a problem hiding this comment.
should we also include docker compose up --build to rebuild changes?
There was a problem hiding this comment.
not anymore because im using the image from ghcr and not building locally
…ide/mint-v2 into mrc-6647-ci-docker
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 upand head to127.0.0.1:3000and ensure everything works as intended