Skip to content

Commit

Permalink
📝 Doc: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
poissoj committed Oct 30, 2024
1 parent de9014f commit 7a4bff2
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,86 @@ The project is available at [DossierFacile.fr](https://dossierfacile.fr).

The front-end code is also accessible in [this repository](https://github.com/MTES-MCT/Dossier-Facile-Frontend).

## Prerequisites

You need to have [Java JDK 21](https://openjdk.org/projects/jdk/21/), [maven](https://maven.apache.org/) and [PostgreSQL](https://www.postgresql.org/) installed.

### Database

Create a dedicated user and database for dossierfacile.

If you want to use [Keycloak](https://www.keycloak.org/) locally, you need to create another database for it.

### Keycloak

You need [Docker](https://www.docker.com/) and [Docker compose](https://docs.docker.com/compose/).

Clone the [DossierFacile-Keycloak project](https://github.com/MTES-MCT/Dossier-Facile-Keycloak).

Download [keycloak-franceconnect-v7.0.0.jar](https://github.com/InseeFr/Keycloak-FranceConnect/releases/download/7.0.0/keycloak-franceconnect-7.0.0.jar) and copy it inside `Dossier-Facile-Keycloak`.

Use the following Dockerfile:

```dockerfile
FROM quay.io/keycloak/keycloak:22.0
ENV TZ=Europe/Paris
COPY keycloak-franceconnect-7.0.0.jar /opt/keycloak/standalone/deployments/keycloak-franceconnect-7.0.0.jar
ADD theme/df /opt/keycloak/themes/df
ADD theme/df-owner /opt/keycloak/themes/df-owner

ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start-dev"]
```

Create `docker-compose.yml` and update it with your database settings.

```YAML
version: '2'
services:
keycloak:
build: .
environment:
- KEYCLOAK_CREATE_ADMIN_USER=false
- KEYCLOAK_ADMIN_USER=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB=postgres
- KC_DB_URL=jdbc:postgresql://localhost:5433/keycloak
- KC_DB_PASSWORD=
- KC_DB_USERNAME=
- KC_HTTP_RELATIVE_PATH=/auth
ports:
- "8085:8080"
```
Use `docker compose up` to launch.

### Config

In each folder `dossierfacile-process-file`, `dossierfacile-bo`, `dossierfacile-pdf-generator`, `dossierfacile-api-owner`, `dossierfacile-api-tenant` and `dossierfacile-api-watermark`, copy `application.properties` into `application-dev.properties`.

Update `application-dev.properties` with your database settings.

## Build

Run `mvn clean install` from the root folder. This will build every module.

## Launch

In each application folder, run

```
mvn spring-boot:run -Dspring-boot.run.profiles=dev,mockOvh
```
## Infrastructure
![Infrastructure diagram](docs/infrastructure_diagram.jpg)
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
## License
[MIT](https://choosealicense.com/licenses/mit/)
Binary file added docs/infrastructure_diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7a4bff2

Please sign in to comment.