diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-04-14 11:44:19 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-04-14 11:44:19 +0000 |
commit | cdc670c5a1c25b0b0ab460b1711a0a42f270b1f3 (patch) | |
tree | 41ac6c0e7a52505fd1d0de057df6d5328a853cd0 /README.md | |
parent | 1a9b563662e9a9dd1f89e04ce0026e2cc5c4771d (diff) |
Upload bff
Issue-ID: PORTAL-1083
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I50f0a2db2dab28354c32c1ebf5a5e22afb0faade
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..48f023d --- /dev/null +++ b/README.md @@ -0,0 +1,68 @@ +# Portal BFF +Backend for Frontend (BFF) component of the portal-ng. + +## Build +You can build and test the application with: +``` sh +# Windows +gradlew clean build +# Unix +./gradlew clean build +``` + +## Test +``` sh +# run all tests +./gradlew test +# run all tests in a test class +./gradlew test --tests GetTileIntegrationTest +# run individual test in a test class +./gradlew test --tests GetTileIntegrationTest.thatTileCanBeRetrieved +# run individual test in a test-class with debug info +./gradlew test --tests GetTileIntegrationTest.thatTileCanBeRetrieved --info +``` + +## Generate JAR +To generate one JAR file including also the open-api part the following command can be used +```sh +# generate JAR to /library/build/libs +./gradlew shadowJar +``` + +## Publish JAR +To publish the generated JAR file run +```sh +# publish JAR to target repository +./gradlew publish +``` + +## Run locally +Currently there are three spring profiles that can be used to run the application (`application.yml`, `application-local.yml` and `application-development.yml`). + +To launch the application with a specific profile run +``` sh +SPRING_PROFILES_ACTIVE=local ./gradlew bootRun +# or +export SPRING_PROFILES_ACTIVE=local +./gradlew bootRun +``` + +## Development +You can run the service locally for evaluation or development purposes using the provided `docker-compose.yml` file in the development folder. This will launch a Keycloak and a Postgres db in the background. + +To start the service execute the `run.sh` in the development folder: +```sh +development/run.sh +``` + +Example request against the portal-prefs service can be run in your preferred IDE with the `request.http` file from the development folder. + +You can access the Keycloak UI via browser. +URL: http://localhost:8080 +**username:** admin +**password:** password + +To stop the portal-prefs service, Keycloak and the databases run: +```sh +development/stop.sh +``` |