Skip to content

Commit 7a39f5b

Browse files
authored
support/docker: Upgrade OS, add more flexible secret storage (#232)
1 parent 6508eff commit 7a39f5b

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

support/deployment/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# correct versions inserted into it. See the documentation for further
1010
# details on how this deployment mechanism works.
1111

12-
FROM ubuntu:18.04
12+
FROM docker.io/ubuntu:20.04
1313

1414
# These environment variables will be set using the release script. It will
1515
# copy the correct values from the poms into these variables so that the right
@@ -48,15 +48,16 @@ ADD ${HVIF2PNG_VERSION}.tgz ${INSTALL_ROOT}
4848
ADD ${PG_DOWNLOAD_URL} ${INSTALL_ROOT}/${PG_JAR}
4949
ADD ${HDS_WAR_DOWNLOAD_URL} ${INSTALL_ROOT}/${HDS_WAR}
5050

51-
RUN echo "HDS_ROOT=${INSTALL_ROOT}" > ${INSTALL_ROOT}/launchenv.sh
52-
RUN echo "JAVA_BIN=${JAVA_BIN}" >> ${INSTALL_ROOT}/launchenv.sh
53-
RUN echo "HDS_HVIF2PNG_PATH=${INSTALL_HVIF2PNG_PATH}" >> ${INSTALL_ROOT}/launchenv.sh
54-
RUN echo "HDS_PORT=${HDS_PORT}" >> ${INSTALL_ROOT}/launchenv.sh
55-
RUN echo "HDS_WAR=${HDS_WAR}" >> ${INSTALL_ROOT}/launchenv.sh
56-
RUN echo "JETTY_JAR=${JETTY_JAR}" >> ${INSTALL_ROOT}/launchenv.sh
57-
RUN echo "PG_JAR=${PG_JAR}" >> ${INSTALL_ROOT}/launchenv.sh
51+
RUN chmod 755 ${INSTALL_ROOT}/launch.sh && \
52+
echo "HDS_ROOT=${INSTALL_ROOT}" > ${INSTALL_ROOT}/launchenv.sh && \
53+
echo "JAVA_BIN=${JAVA_BIN}" >> ${INSTALL_ROOT}/launchenv.sh && \
54+
echo "HDS_HVIF2PNG_PATH=${INSTALL_HVIF2PNG_PATH}" >> ${INSTALL_ROOT}/launchenv.sh && \
55+
echo "HDS_PORT=${HDS_PORT}" >> ${INSTALL_ROOT}/launchenv.sh && \
56+
echo "HDS_WAR=${HDS_WAR}" >> ${INSTALL_ROOT}/launchenv.sh && \
57+
echo "JETTY_JAR=${JETTY_JAR}" >> ${INSTALL_ROOT}/launchenv.sh && \
58+
echo "PG_JAR=${PG_JAR}" >> ${INSTALL_ROOT}/launchenv.sh
5859

59-
CMD [ "sh", "/opt/haikudepotserver/launch.sh" ]
60+
CMD [ "/opt/haikudepotserver/launch.sh" ]
6061

6162
HEALTHCHECK --interval=30s --timeout=10s CMD curl -f http://localhost:8080/__metric/healthcheck
6263
EXPOSE ${HDS_PORT}

support/deployment/launch.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
# launch file for the haikudepotserver system.
1+
#!/bin/bash
22

3+
# launch file for the haikudepotserver system.
34
. "$(dirname $0)/launchenv.sh"
4-
. "/secrets/hds_secrets"
5+
6+
# source secrets file if provided, otherwise from env
7+
if [ -f "/secrets/hds_secrets" ]; then
8+
echo "Sourcing secrets from /secrets/hds_secrets..."
9+
. "/secrets/hds_secrets"
10+
fi
511

612
"${JAVA_BIN}" \
713
"-Dfile.encoding=UTF-8" \

0 commit comments

Comments
 (0)