diff --git a/build.sh b/build.sh index 2727a21a38f0343800883645c1f6f6118526281a..4ee3ccfc116dc84b035d9623c8ffca84b9199f02 100755 --- a/build.sh +++ b/build.sh @@ -26,7 +26,7 @@ else DOCKER="sudo docker" fi -IMAGE="kkech/portal_backend" +IMAGE="thanasulas/portal_backend" VCS_REF=$(git describe --tags --dirty) VERSION=$(git describe --tags --dirty) @@ -34,9 +34,11 @@ docker build --build-arg BUILD_DATE=$(date -Iseconds) \ --build-arg VCS_REF=$VCS_REF \ --build-arg VERSION=$VERSION \ --tag "$IMAGE:latest" \ - --tag "$IMAGE:$VERSION" \ . +docker push thanasulas/portal_backend:latest + + BUGSNAG_KEY="" eval $(grep -e "^\\s*BUGSNAG_KEY" Dockerfile | tr '\\' ' ') diff --git a/src/main/java/eu/hbp/mip/MIPApplication.java b/src/main/java/eu/hbp/mip/MIPApplication.java index befb16ec91ee35a0bbd2c9a7631f30be9cde4b21..e6ccd8e1e2d1e71107a9d262b21e02bb070eefae 100644 --- a/src/main/java/eu/hbp/mip/MIPApplication.java +++ b/src/main/java/eu/hbp/mip/MIPApplication.java @@ -9,7 +9,6 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; @SpringBootApplication public class MIPApplication { diff --git a/src/main/java/eu/hbp/mip/configuration/PersistenceConfiguration.java b/src/main/java/eu/hbp/mip/configuration/PersistenceConfiguration.java index 5c03ec4ebf5a95f424e4214de582c7967ce14d93..6b973dc6575c2027a344b0a872591f1b465e9a87 100644 --- a/src/main/java/eu/hbp/mip/configuration/PersistenceConfiguration.java +++ b/src/main/java/eu/hbp/mip/configuration/PersistenceConfiguration.java @@ -46,5 +46,4 @@ public class PersistenceConfiguration { flyway.setDataSource(portalDataSource()); return flyway; } - } diff --git a/src/main/java/eu/hbp/mip/helpers/GenParameters.java b/src/main/java/eu/hbp/mip/helpers/GenParameters.java index 92de055242eeb6b6d346c46612d9d3b98521a40b..696a90b551525794bb0a1d7b3425d95e0075d323 100644 --- a/src/main/java/eu/hbp/mip/helpers/GenParameters.java +++ b/src/main/java/eu/hbp/mip/helpers/GenParameters.java @@ -7,13 +7,6 @@ package eu.hbp.mip.helpers; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.core.io.ClassPathResource; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; public class GenParameters { @@ -33,7 +26,7 @@ public class GenParameters { private String galaxyReverseProxyPassword; - private GenParameters(){ + private GenParameters() { } @@ -49,31 +42,8 @@ public class GenParameters { genParams.setGalaxyReverseProxyUsername(System.getenv("GALAXY_REVERSE_PROXY_USERNAME")); genParams.setGalaxyReverseProxyPassword(System.getenv("GALAXY_REVERSE_PROXY_PASSWORD")); - - //If environment variable not exists read from file. - if (genParams.getJwtSecret() == null){ - throw new RuntimeException("Cannot find Enviroment Variables"); -// logger.info("->>>>>>>Reading from file"); -// -// File file = null; -// try { -// file = new ClassPathResource("config.properties").getFile(); -// InputStream input = new FileInputStream(file); -// Properties prop = new Properties(); -// -// // load a properties file -// prop.load(input); -// -// // get the property value and print it out -// genParams.setJwtSecret(prop.getProperty("jwtSecret")); -// genParams.setJwtIssuer(prop.getProperty("jwtIssuer")); -// genParams.setGalaxyURL(prop.getProperty("galaxyURL")); -// genParams.setGalaxyApiKey(prop.getProperty("galaxyApiKey")); -// genParams.setGalaxyReverseProxyUsername(prop.getProperty("galaxyReverseProxyUsername")); -// genParams.setGalaxyReverseProxyPassword(prop.getProperty("galaxyReverseProxyPassword")); -// } catch (IOException e) { -// logger.error("Cannot initialize GenParameters from config file", e); -// } + if (genParams.getJwtSecret() == null) { + throw new RuntimeException("Cannot find Environment Variables"); } } return genParams; @@ -88,7 +58,7 @@ public class GenParameters { } public String getJwtIssuer() { - return jwtIssuer; + return jwtIssuer; } private void setJwtIssuer(String jwtIssuer) {