Skip to content

Commit 787bb13

Browse files
author
Sascha Pfeiffer
committed
added option to overwrite the config.json with environment variables
Signed-off-by: Sascha Pfeiffer <sascha.pfeiffer@psono.com>
1 parent 8d9f2cb commit 787bb13

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ RUN apk upgrade --no-cache \
77

88
COPY ./configs/nginx.conf /etc/nginx/nginx.conf
99
COPY ./configs/default.conf /etc/nginx/conf.d/default.conf
10+
COPY ./configs/cmd.sh /root/cmd.sh
1011
COPY ./build /usr/share/nginx/html/portal
1112
COPY ./configs/redirect.html /usr/share/nginx/html/index.html
1213

1314
HEALTHCHECK --interval=30s --timeout=3s \
1415
CMD curl -f http://localhost/ || exit 1
16+
17+
CMD ["/bin/sh", "/root/cmd.sh"]

configs/cmd.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
if [ ! -z "$PSONO_PORTAL_CONFIG_JSON" ]
2+
then
3+
echo "$PSONO_PORTAL_CONFIG_JSON" > /usr/share/nginx/html/portal/config.json
4+
fi
5+
6+
nginx -g "daemon off;"

0 commit comments

Comments
 (0)