File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -147,12 +147,10 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
147147COPY nginx.conf /etc/nginx/nginx.conf
148148COPY ldap.conf.template /etc/nginx/conf.d/ldap.conf.template
149149COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf
150+ COPY nginx-envsubst.sh /usr/bin/nginx-envsubst
150151
151152EXPOSE 80
152153
153154STOPSIGNAL SIGTERM
154155
155- CMD [ \
156- "sh" , "-c" , \
157- "envsubst '$$NGINX_AUTH_LDAP_URL$$NGINX_AUTH_LDAP_BINDDN$$NGINX_AUTH_LDAP_BINDPW' < /etc/nginx/conf.d/ldap.conf.template > /etc/nginx/conf.d/000-ldap.conf && exec nginx -g 'daemon off;'" \
158- ]
156+ CMD ["sh" , "-c" , "nginx-envsubst && exec nginx -g 'daemon off;'" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ for template in $( find /etc/nginx -name ' *.conf.template' ) ; do
4+ envsubst " $( printf ' ${%s} ' $( env | cut -d= -f1) ) " < $template > ${template% .template}
5+ done
You can’t perform that action at this time.
0 commit comments