diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59aaa87..31d9b4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,7 @@ jobs: export BASE_IMAGE="baseimage-fatjar-openjdk21:master" source ci-tools/common/setup-tools.sh mv ovara-backend/target/ovara-backend-*.jar $DOCKER_BUILD_DIR/artifact/${ARTIFACT_NAME}.jar - cp -vr ovara-backend/src/main/resources/application.properties $DOCKER_BUILD_DIR/config/ + cp -vr ovara-backend/src/main/resources/oph-configuration/application.properties.template $DOCKER_BUILD_DIR/config/oph-configuration/application.properties.template ./ci-tools/common/pull-image.sh ./ci-tools/github-build/build-fatjar.sh $ARTIFACT_NAME ./ci-tools/github-build/upload-image.sh $ARTIFACT_NAME diff --git a/ovara-backend/src/main/resources/application.properties b/ovara-backend/src/main/resources/application.properties index fd66fe9..9a1332b 100644 --- a/ovara-backend/src/main/resources/application.properties +++ b/ovara-backend/src/main/resources/application.properties @@ -10,7 +10,7 @@ spring.datasource.password={{ovara_backend_postgresql_password}} # CAS opintopolku.virkailija.domain={{host_virkailija}} ovara.backend.url=https://${opintopolku.virkailija.domain}/ovara-backend -ovara.ui.url=https://${opintopolku.virkailija.domain} +ovara.ui.url=https://${opintopolku.virkailija.domain}/raportointi cas.url=https://${opintopolku.virkailija.domain}/cas ovara-backend.cas.username={{ovara_backend_cas_username}} ovara-backend.cas.password={{ovara_backend_cas_password}} diff --git a/ovara-backend/src/main/resources/oph-configuration/application.properties.template b/ovara-backend/src/main/resources/oph-configuration/application.properties.template new file mode 100644 index 0000000..9a1332b --- /dev/null +++ b/ovara-backend/src/main/resources/oph-configuration/application.properties.template @@ -0,0 +1,16 @@ +spring.application.name=ovara-backend +server.servlet.context-path=/ovara-backend + +# ENVIRONMENT SPECIFIC CONFIG +# DB CONNECTION +spring.datasource.url={{host_postgresql_ovara}} +spring.datasource.username={{ovara_backend_postgresql_username}} +spring.datasource.password={{ovara_backend_postgresql_password}} + +# CAS +opintopolku.virkailija.domain={{host_virkailija}} +ovara.backend.url=https://${opintopolku.virkailija.domain}/ovara-backend +ovara.ui.url=https://${opintopolku.virkailija.domain}/raportointi +cas.url=https://${opintopolku.virkailija.domain}/cas +ovara-backend.cas.username={{ovara_backend_cas_username}} +ovara-backend.cas.password={{ovara_backend_cas_password}} diff --git a/ovara-backend/src/main/scala/fi/oph/ovara/backend/raportointi/Controller.scala b/ovara-backend/src/main/scala/fi/oph/ovara/backend/raportointi/Controller.scala index 4dc0e47..f0a5b5e 100644 --- a/ovara-backend/src/main/scala/fi/oph/ovara/backend/raportointi/Controller.scala +++ b/ovara-backend/src/main/scala/fi/oph/ovara/backend/raportointi/Controller.scala @@ -37,7 +37,7 @@ class Controller( mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) mapper.configure(SerializationFeature.INDENT_OUTPUT, true) - @GetMapping(path = Array("ping")) + @GetMapping(path = Array("healthcheck")) def ping = "Ovara application is running!" @GetMapping(path = Array("user"))