From 538f19d0b22e639e9fba0a143f60665fdb3d79f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 3 Mar 2021 20:53:51 +0100 Subject: [PATCH] move nginx static config to build (#190) move nginx static config to build... --- containers/zammad/docker-entrypoint.sh | 4 ---- containers/zammad/setup.sh | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/containers/zammad/docker-entrypoint.sh b/containers/zammad/docker-entrypoint.sh index fe423a6..d1faf87 100755 --- a/containers/zammad/docker-entrypoint.sh +++ b/containers/zammad/docker-entrypoint.sh @@ -120,10 +120,6 @@ if [ "$1" = 'zammad-nginx' ]; then check_zammad_ready # configure nginx - sed -i -e "s#user www-data;##g" \ - -e 's#/var/log/nginx/\(access\|error\).log#/dev/stdout#g' \ - -e 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#g' /etc/nginx/nginx.conf - sed -e "s#proxy_set_header X-Forwarded-Proto .*;#proxy_set_header X-Forwarded-Proto ${NGINX_SERVER_SCHEME};#g" \ -e "s#server .*:3000#server ${ZAMMAD_RAILSSERVER_HOST}:${ZAMMAD_RAILSSERVER_PORT}#g" \ -e "s#server .*:6042#server ${ZAMMAD_WEBSOCKET_HOST}:${ZAMMAD_WEBSOCKET_PORT}#g" \ diff --git a/containers/zammad/setup.sh b/containers/zammad/setup.sh index eef1f74..3bbf654 100755 --- a/containers/zammad/setup.sh +++ b/containers/zammad/setup.sh @@ -36,8 +36,9 @@ if [ "$1" = 'builder' ]; then chown -R "${ZAMMAD_USER}":"${ZAMMAD_USER}" "${ZAMMAD_TMP_DIR}" fi -# set nginx file permissions +# set nginx file permissions and settings if [ "$1" = 'runner' ]; then + sed -i -e "s#user www-data;##g" -e 's#/var/log/nginx/\(access\|error\).log#/dev/stdout#g' -e 's#pid /run/nginx.pid;#pid /tmp/nginx.pid;#g' /etc/nginx/nginx.conf mkdir -p "${ZAMMAD_DIR}" /var/log/nginx chown -R "${ZAMMAD_USER}":"${ZAMMAD_USER}" /etc/nginx "${ZAMMAD_DIR}" /var/lib/nginx /var/log/nginx fi