From 3bb1f6f794defdc9a072dad811f2d1db56a3734e Mon Sep 17 00:00:00 2001 From: Berend Weel Date: Fri, 2 Apr 2021 15:29:03 +0200 Subject: [PATCH] Updated distribution, now displaying correct scheme on startup --- build.gradle | 13 +++++++++++-- config/config.yml | 2 +- .../computeservice/rest/Application.java | 6 +++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 3b57528..e71933d 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,7 @@ application { mainClassName = 'nl.esciencecenter.computeservice.rest.Application' } + // In this section you declare where to find the dependencies of your project repositories { // Use 'jcenter' for resolving your dependencies. @@ -82,12 +83,16 @@ dependencies { testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '2.2.4.RELEASE' } +bootJar { + baseName = 'xenonflow' +} + // Include some more files in the distribution zip // Don't use include an extra directory in the dist zip. distributions { - main { + boot { + baseName = 'xenonflow' contents { - from(['config/config.yml', 'config/application.properties']) { into '/config' } @@ -107,6 +112,10 @@ distributions { } } +// Disable the other distributions +distZip.enabled = false +distTar.enabled = false + test { testLogging { events "passed", "skipped", "failed" diff --git a/config/config.yml b/config/config.yml index 402e156..617c625 100755 --- a/config/config.yml +++ b/config/config.yml @@ -39,7 +39,7 @@ targetFileSystem: location: ${XENONFLOW_HOME}/output/ hosted: true -# Optional: Location where xenonflow can find the cwl workflows that are +# Location where xenonflow can find the cwl workflows that are # allowed to be run. If specified xenonflow will restrict running workflows # to those available here. If not specified any workflow that cwltool can find # can be executed diff --git a/src/main/java/nl/esciencecenter/computeservice/rest/Application.java b/src/main/java/nl/esciencecenter/computeservice/rest/Application.java index 74dc3bd..27d19f9 100644 --- a/src/main/java/nl/esciencecenter/computeservice/rest/Application.java +++ b/src/main/java/nl/esciencecenter/computeservice/rest/Application.java @@ -68,6 +68,9 @@ public class Application extends WebSecurityConfigurerAdapter implements WebMvcC @Value("${server.port}") private String serverPort; + @Value("${server.ssl.enabled}") + private boolean ssl; + @Value("${xenonflow.config}") private String xenonConfigFile; @@ -214,6 +217,7 @@ public int getExitCode() { @Override public void onApplicationEvent(ApplicationReadyEvent event) { - logger.info("Server running at: http://" + bindAdress + ":" + serverPort); + String scheme = ssl ? "https://" : "http://"; + logger.info("Server running at: " + scheme + bindAdress + ":" + serverPort); } }