- Kotlin
- Spring boot
- Gradle
Make sure you have the Java JDK 21 installed You can check which version you have installed using this command:
java -version
Make sure you have the Docker installed You can check which version you have installed using this command:
docker --version
Make sure you have the Docker-compose installed You can check which version you have installed using this command:
docker-compose --version
To build locally and run the integration tests you can simply run
./gradlew bootJar
or on windows
gradlew.bat bootJar
Note
Remember to run the external services the application needs to be able to run, see Running the application and the mock-oauth2-server from docker compose
run this command
SECURELOGS_DIR=./ AZURE_APP_WELL_KNOWN_URL='http://localhost:${mock-oauth2-server.port}/azuread/.well-known/openid-configuration' AZURE_APP_CLIENT_ID='syk-inn-api-client-id' AZURE_OPENID_CONFIG_TOKEN_ENDPOINT='http://localhost:${mock-oauth2-server.port}/azuread/token' SYFOHELSENETTPROXY_SCOPE=syfohelsenettproxyscope AZURE_APP_CLIENT_SECRET=secretzz MOCK_OAUTH2_SERVER_PORT=6969 KAFKA_BROKERS='localhost:9092' KAFKA_TRUSTSTORE_PATH='' KAFKA_CREDSTORE_PASSWORD='' KAFKA_SECURITY_PROTOCOL='PLAINTEXT' KAFKA_KEYSTORE_PATH='' SYFOSMREGLER_SCOPE=syfosmreglerscope AZURE_OPENID_CONFIG_ISSUER='http://localhost:${mock-oauth2-server.port}/azuread' ./gradlew bootRun
or on windows
SECURELOGS_DIR=./ AZURE_APP_WELL_KNOWN_URL='http://localhost:${mock-oauth2-server.port}/azuread/.well-known/openid-configuration' AZURE_APP_CLIENT_ID='syk-inn-api-client-id' AZURE_OPENID_CONFIG_TOKEN_ENDPOINT='http://localhost:${mock-oauth2-server.port}/azuread/token' SYFOHELSENETTPROXY_SCOPE=syfohelsenettproxyscope AZURE_APP_CLIENT_SECRET=secretzz MOCK_OAUTH2_SERVER_PORT=6969 KAFKA_BROKERS='localhost:9092' KAFKA_TRUSTSTORE_PATH='' KAFKA_CREDSTORE_PASSWORD='' KAFKA_SECURITY_PROTOCOL='PLAINTEXT' KAFKA_KEYSTORE_PATH='' SYFOSMREGLER_SCOPE=syfosmreglerscope AZURE_OPENID_CONFIG_ISSUER='http://localhost:${mock-oauth2-server.port}/azuread' gradlew.bat bootRun
Creating a docker image should be as simple as
docker build -t syk-inn-api .
Note
Remember to build the application before,you create a docker image, see Building the application
docker-compose up -d
Locally http://localhost:8080/v3/api-docs or on http://syk-inn-api.intern.dev.nav.no:8080/v3/api-docs
Find the newest version of gradle here: https://gradle.org/releases/ Then run this command:
./gradlew wrapper --gradle-version $gradleVersjon
This project is maintained by navikt/tsm
Questions and/or feature requests? Please create an issue
If you work in @navikt you can reach us at the Slack channel #team-sykmelding