Skip to content

Commit 37f225d

Browse files
committed
Use gunicorn chdir option in docker start script
- Use gunicorn chdir option as fallback `conf_opt` in case no gunicorn config file is provided. This avoids running `cd` to $DATA_DIR.
1 parent 6cb716d commit 37f225d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docker/start.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ satosa-saml-metadata \
4141
# if the user provided a gunicorn configuration, use it
4242
if [ -f "$GUNICORN_CONF" ]
4343
then conf_opt="--config ${GUNICORN_CONF}"
44+
else conf_opt="--chdir ${DATA_DIR}"
4445
fi
4546

4647
# if HTTPS cert is available, use it
@@ -57,9 +58,9 @@ then chain_opts="--ca-certs chain.pem"
5758
fi
5859

5960
# start the proxy
60-
(cd $DATA_DIR; exec gunicorn $conf_opt \
61+
exec gunicorn $conf_opt \
6162
-b 0.0.0.0:"${PROXY_PORT}" \
6263
satosa.wsgi:app \
6364
$https_opts \
6465
$chain_opts \
65-
;)
66+
;

0 commit comments

Comments
 (0)