Skip to content
Snippets Groups Projects
Commit 74bb7696 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Merge branch 'docker-fix' into 'master'

Docker fix

See merge request ghsc/nshmp/nshmp-netcdf!23
parents 5e44fd08 ac2f2856
No related branches found
No related tags found
1 merge request!23Docker fix
Pipeline #10461 passed
...@@ -76,7 +76,9 @@ stages: ...@@ -76,7 +76,9 @@ stages:
cache: {} cache: {}
image: ${CODE_REGISTRY}/ghsc/hazdev/cloud-formation/hazdev-build-runner:latest image: ${CODE_REGISTRY}/ghsc/hazdev/cloud-formation/hazdev-build-runner:latest
dependencies: dependencies:
retry: 2
before_script: before_script:
- docker stack rm nshmp-netcdf
- *static-data - *static-data
- | - |
for data in ${STATIC_DATA}; do for data in ${STATIC_DATA}; do
......
...@@ -49,14 +49,13 @@ ARG netcdf_file="src/main/resources/default.nc" ...@@ -49,14 +49,13 @@ ARG netcdf_file="src/main/resources/default.nc"
# The NSHM to use # The NSHM to use
ENV NSHM "CONUS_2018" ENV NSHM "CONUS_2018"
ENV CONTEXT_PATH "" ENV CONTEXT_PATH "/"
ARG jar_file ARG jar_file
ARG project ARG project
ARG workdir ARG workdir
ENV PROJECT ${project} ENV PROJECT ${project}
ENV NETCDF_FILE ${netcdf_file} ENV NETCDF_FILE ${netcdf_file}
ENV MN_CONTEXT_PATH "-Dmicronaut.server.context-path=${CONTEXT_PATH}"
WORKDIR ${workdir} WORKDIR ${workdir}
...@@ -67,6 +66,6 @@ RUN yum install -y java-11-openjdk-headless ...@@ -67,6 +66,6 @@ RUN yum install -y java-11-openjdk-headless
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT /usr/bin/java -jar ${PROJECT}.jar \ ENTRYPOINT /usr/bin/java -jar ${PROJECT}.jar \
${MN_CONTEXT_PATH} \ "-Dmicronaut.server.context-path=${CONTEXT_PATH}" \
-nshm=${NSHM} \ -nshm=${NSHM} \
-netcdf=${NETCDF_FILE} -netcdf=${NETCDF_FILE}
...@@ -35,7 +35,7 @@ dependencies { ...@@ -35,7 +35,7 @@ dependencies {
implementation "edu.ucar:netcdf4:${netcdfVersion}" implementation "edu.ucar:netcdf4:${netcdfVersion}"
implementation "org.slf4j:slf4j-jdk14:${slfVersion}" implementation "org.slf4j:slf4j-jdk14:${slfVersion}"
// micronaut // Micronaut
annotationProcessor platform("io.micronaut:micronaut-bom:${mnVersion}") annotationProcessor platform("io.micronaut:micronaut-bom:${mnVersion}")
annotationProcessor "io.micronaut:micronaut-inject-java" annotationProcessor "io.micronaut:micronaut-inject-java"
annotationProcessor "io.micronaut:micronaut-validation" annotationProcessor "io.micronaut:micronaut-validation"
...@@ -46,7 +46,6 @@ dependencies { ...@@ -46,7 +46,6 @@ dependencies {
implementation "io.micronaut:micronaut-runtime" implementation "io.micronaut:micronaut-runtime"
implementation "io.micronaut:micronaut-http-server-netty" implementation "io.micronaut:micronaut-http-server-netty"
implementation "com.fasterxml.jackson.module:jackson-module-parameter-names:${jacksonVersion}" implementation "com.fasterxml.jackson.module:jackson-module-parameter-names:${jacksonVersion}"
runtimeOnly "io.micronaut:micronaut-runtime-osx"
runtimeOnly "ch.qos.logback:logback-classic:${logbackVersion}" runtimeOnly "ch.qos.logback:logback-classic:${logbackVersion}"
// Swagger // Swagger
......
export SERVICE_MAP=( export SERVICE_MAP=(
"/nshmp-ws/static/conus-2018":"conus-2018a" "/nshmp/ws/static/conus-2018":"conus-2018a"
); );
...@@ -22,4 +22,4 @@ services: ...@@ -22,4 +22,4 @@ services:
image: ${REGISTRY}/${CI_PROJECT_NAME}:${DATA_CONUS_2018A} image: ${REGISTRY}/${CI_PROJECT_NAME}:${DATA_CONUS_2018A}
environment: environment:
NSHM: CONUS_2018 NSHM: CONUS_2018
CONTEXT_PATH: /nshmp-ws/static/conus-2018 CONTEXT_PATH: /nshmp/ws/static/conus-2018
...@@ -11,13 +11,16 @@ ...@@ -11,13 +11,16 @@
<script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script> <script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
<script> <script>
let pathname = window.location.pathname;
pathname = pathname == "/" ? "" : pathname;
SwaggerUIBundle({ SwaggerUIBundle({
url: "./swagger/netcdf-services.yml", url: `${pathname}/swagger/netcdf-services.yml`,
dom_id: '#swagger-ui', dom_id: '#swagger-ui',
presets: [ presets: [
SwaggerUIBundle.presets.apis SwaggerUIBundle.presets.apis
] ]
}) });
</script> </script>
</body> </body>
</html> </html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment