From 3c2f7d233af484c47829d6695081cca6892ae693 Mon Sep 17 00:00:00 2001 From: Jean-Marie Poissonnier Date: Wed, 30 Oct 2024 17:21:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Doc:=20update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b8426412..b5879edb5 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ You need to have [JDK 21](https://openjdk.org/projects/jdk/21/), [maven](https:/ ### Database Run: + ``` docker-compose -f docker-compose.dev.yml up -d ``` @@ -27,9 +28,10 @@ To create a dedicated user and database for dossierfacile. If you want to use [Keycloak](https://www.keycloak.org/) locally, follow the README instructions on repo [Dossier-Facile-Keycloak](https://github.com/MTES-MCT/Dossier-Facile-Keycloak). To run this project, you will need the realm "dossier-facile" and a new client "dossier-facile-api", with: + - selected theme "df" - in capability config, "client authentication" activated -Then go to tab "credentials" and copy the client secret + Then go to tab "credentials" and copy the client secret ### Config @@ -176,8 +178,57 @@ brevo.apikey= For each properties file, copy the `brevo.template.*` properties from `application.properties` to `application-dev.properties` and set the correct ids. Note: + - dans le cas du run du service `dossierfacile-bo`, il semble manquer quelques identifiants de templates (notamment côté partner) +## nginx + +For dossierfacile-bo, you need https access. You can use this nginx config for that: + +```nginx +upstream df-bo-server { + server localhost:8081; +} + +server { + listen 80; + listen [::]:80; + server_name bo-local.dossierfacile.fr; + location / { + return 302 https://$host$request_uri; + } +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + server_name bo-local.dossierfacile.fr; + ssl_certificate /etc/ssl/domain.crt; + ssl_certificate_key /etc/ssl/domain.key; + ssl_trusted_certificate /etc/ssl/bo_server.crt; + location / { + proxy_pass http://df-bo-server/; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $host; + proxy_redirect default; + } + location /static/ { + alias /static/; + } +} + +``` + +You can [create the certificate files with open-ssl](https://www.baeldung.com/openssl-self-signed-cert). + +Then add the following line to your `/etc/hosts` file: + +``` +127.0.0.1 bo-local.dossierfacile.fr +``` + ## Build Run `mvn clean install` from the root folder. This will build every module.