Skip to content

Commit

Permalink
Updated distribution, now displaying correct scheme on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
bpmweel committed Apr 2, 2021
1 parent e724881 commit 3bb1f6f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
13 changes: 11 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'
}
Expand All @@ -107,6 +112,10 @@ distributions {
}
}

// Disable the other distributions
distZip.enabled = false
distTar.enabled = false

test {
testLogging {
events "passed", "skipped", "failed"
Expand Down
2 changes: 1 addition & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}

0 comments on commit 3bb1f6f

Please sign in to comment.