Skip to content

Feat workflows#2

Merged
devleesch001 merged 14 commits into
mainfrom
feat-workflows
Sep 17, 2025
Merged

Feat workflows#2
devleesch001 merged 14 commits into
mainfrom
feat-workflows

Conversation

@devleesch001

Copy link
Copy Markdown
Owner

This pull request introduces significant improvements to both backend and frontend build, deployment, and configuration processes. The main changes include the addition of dedicated CI/CD workflows for each part of the stack, refactoring Dockerfiles for multi-stage builds, implementing a centralized frontend API configuration, and adding graceful shutdown logic for backend services.

CI/CD and Deployment Enhancements

  • Added GitHub Actions workflows for backend (.github/workflows/back.yml) and frontend (.github/workflows/front.yml) to automate build and Docker image publishing on relevant code changes.
    Dockerfile and Build Process Refactoring
  • Refactored both back/Dockerfile and front/Dockerfile to use Node.js 22 and multi-stage builds, resulting in smaller, production-ready images and cleaner separation of build and runtime environments.
  • Added .dockerignore files to backend and frontend to exclude unnecessary files from Docker build contexts, improving build performance.

Frontend Configuration and API Integration

  • Introduced a runtime API configuration mechanism for the frontend by adding front/public/config/app-config.js, referencing it in index.html, and refactoring API modules to use this config instead of hardcoded environment variables.
    Backend Service Reliability
  • Implemented graceful shutdown logic in back/src/index.ts to ensure clean closure of HTTP server, MongoDB, and Redis connections on termination signals.

Dependency and Package Management

  • Cleaned up and reorganized dependencies in both back/package.json and front/package.json to ensure proper separation of dev and production dependencies, and updated lockfiles accordingly.

@devleesch001 devleesch001 merged commit b29efad into main Sep 17, 2025
6 checks passed
@devleesch001 devleesch001 self-assigned this Sep 17, 2025
devleesch001 added a commit that referenced this pull request Sep 17, 2025
* Add CI workflows for frontend and backend, and update Dockerfile for multi-stage builds

* Comment out test execution in CI workflows for frontend and backend

* update Node.js version in CI workflow from 20 to 22

* Update CI workflow triggers to include workflow files for frontend and backend

* Update CI workflows to specify context and Dockerfile paths for frontend and backend

* Refine .dockerignore to include README.md and exclude unnecessary files

* Remove production flag from npm ci command in Dockerfile

* Update Dockerfile to copy from 'dist' directory and serve from 'dist'

* Update Dockerfile to remove production flag from npm ci command and adjust base image

* Update Dockerfile to clean npm cache after installation and add additional development dependencies

* Implement graceful shutdown for the server and enhance shutdown logging

* Update Dockerfile and package.json for improved build and configuration management

* Refactor API URL configuration to use centralized config file

* Fix indentation in App.test.tsx for improved readability

---------

Co-authored-by: Alexis DEVLEESCHAUWER <a.devleeschauwer@pyres.com>
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.

1 participant