RapportNav is a mission reporting tools developed by the French administration (https://mer.gouv.fr/).
The documentation can be found here.
- Infra:
- Docker
- GitHub Actions
- Backend:
- Gradle
- Kotlin
- Spring-boot
- Flyway migrations
- Database:
- PostgreSQL 15
- Frontend:
- TypeScript
- React
- Vite + Vitest
- Monitor-ui design system
Before trying to run the project, make sure you have:
- installed Postgres 15
- created the
rapportnavdb
database with the right users and passwords- on macOS:
createdb rapportnavdb
- use
dropdb rapportnavdb
if you wanna start clean
- on macOS:
- created the role
postgres
:createuser --interactive
- get into the database:
psql -d rapportnavdb -U postgres -h localhost
- check the role is present with the cmd:
\du
- get into the database:
- created a
metabase
schema"CREATE SCHEMA metabase;
and verify with\dn
The app is fully dockerized for local development. Run the command make docker-run-local
- frontend is available at http://localhost:5173/
- backend is available at http://localhost:80/
If you have an Apple chipset don't forget to add the following line in your .bashrc:
export DOCKER_DEFAULT_PLATFORM=linux/amd64
The following checks are performed through Github Actions:
- dependencies:
- frontend:
npm audit
- backend: OWASP Dependency-Check
- frontend:
- vulnerabilities: CodeQL from GitHub
- container scan: Trivy
As we are mirroring our repo onto our host's repo, who can also provide changes and commits, make sure to align the two repos before deploying:
- add mirror if you
haven't:
git remote add mirror https://gitlab-sml.din.developpement-durable.gouv.fr/rapportnav-v2/rapportnav_v2.git
- fetch changes:
git fetch mirror
- username: use your @i-carre.net email
- password: use token provided by other devs or devops at DSI
- pull changes if existing:
git pull mirror main
- push to this repo if necessary
- Make sure you have the last changes from the mirror: so fetch & pull code from mirror
- Set version number in
build.gradle.kts
- Set version number in
package.json
andmake front-ci
again to regen thepackage-lock.json
- Set version number in the variable
PROJECT_VERSION
in the file.gitlab-ci.yml
- Create a GitHub release with the same version number
- check the running
release
Action - check the pipeline here
- clone the gitlab repo:
git clone https://gitlab-sml.din.developpement-durable.gouv.fr/rapportnav-v2/rapportnav_v2.git
- username: use your @i-carre.net email
- password: use token provided by other devs or devops at DSI
- add the github repo as mirror
git remote add mirror https://github.com/MTES-MCT/rapportnav2.git
- fetch changes:
git fetch
- pull changes to your local branch to align with the remote main
git pull
- fetch mirror:
git fetch mirror
- pull the remote changes:
git pull mirror main
- push the changes to start the deployment:
git push