Skip to content

Commit c3096aa

Browse files
committed
fix: move files before checking for config in new location
1 parent 408cdba commit c3096aa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docker-entrypoint.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ JINJA2="import os, sys, jinja2; sys.stdout.write(jinja2.Template(sys.stdin.read(
44

55
ALERTA_CONF_FILE=${ALERTA_CONF_FILE:-/app/alerta.conf}
66
ALERTA_SVR_CONF_FILE=${ALERTA_SVR_CONF_FILE:-/app/alertad.conf}
7-
ALERTA_WEB_CONF_FILE=${ALERTA_WEB_CONF_FILE:-/web/config.json}
7+
ALERTA_WEB_CONF_FILE=/web${FRONTEND_BASE_URL}config.json
88
NGINX_CONF_FILE=/app/nginx.conf
99
UWSGI_CONF_FILE=/app/uwsgi.ini
1010
SUPERVISORD_CONF_FILE=/app/supervisord.conf
@@ -76,17 +76,17 @@ if [ ! -f "${UWSGI_CONF_FILE}" ]; then
7676
python3 -c "${JINJA2}" < ${UWSGI_CONF_FILE}.j2 >${UWSGI_CONF_FILE}
7777
fi
7878

79+
if [ ! -d "/web${FRONTEND_BASE_URL}" ]; then
80+
mkdir /web${FRONTEND_BASE_URL}
81+
mv /web/* /web${FRONTEND_BASE_URL} || :
82+
fi
83+
7984
# Generate web config, if not supplied.
8085
if [ ! -f "${ALERTA_WEB_CONF_FILE}" ]; then
8186
if [ $INIT_LOG = true ]; then echo "# Create web configuration file."; fi
8287
python3 -c "${JINJA2}" < ${ALERTA_WEB_CONF_FILE}.j2 >${ALERTA_WEB_CONF_FILE}
8388
fi
8489

85-
if [ ! -d "/web${FRONTEND_BASE_URL}" ]; then
86-
mkdir /web${FRONTEND_BASE_URL}
87-
mv /web/* /web${FRONTEND_BASE_URL} || :
88-
fi
89-
9090
if [ $INIT_LOG = true ]; then
9191
echo
9292
echo '# Checking versions.'

0 commit comments

Comments
 (0)