Skip to content

Commit

Permalink
📝 Doc: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
poissoj committed Nov 26, 2024
1 parent 4971fec commit 3c2f7d2
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 3c2f7d2

Please sign in to comment.