mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-14 10:55:39 +00:00
Generate the static files in the entrypoint.sh
This commit is contained in:
@@ -29,8 +29,6 @@ RUN wget -q -O /root/zulip-ppa.asc https://zulip.com/dist/keys/zulip-ppa.asc &&
|
||||
ln -nsf "$ZULIP_DEPLOY_PATH" "/home/zulip/deployments/next" && \
|
||||
ln -nsf "$ZULIP_DEPLOY_PATH" "/home/zulip/deployments/current" && \
|
||||
ln -nsf /etc/zulip/settings.py "$ZULIP_DEPLOY_PATH/zproject/local_settings.py" && \
|
||||
/root/zulip/tools/update-prod-static && \
|
||||
cp -rfT "$ZULIP_DEPLOY_PATH/prod-static/serve" "/home/zulip/prod-static" && \
|
||||
chown -R zulip:zulip /home/zulip /var/log/zulip /etc/zulip/settings.py && \
|
||||
apt-get -qq autoremove --purge -y && \
|
||||
apt-get -qq clean && \
|
||||
|
||||
@@ -406,6 +406,13 @@ zulipFirstStartInit() {
|
||||
echo "First Start Init not needed."
|
||||
return 0
|
||||
fi
|
||||
if [ ! -d "/home/zulip/prod-static" ] || [ "$(ls -A "/home/zulip/prod-static/")" ]; then
|
||||
echo "Generating static files ..."
|
||||
/root/zulip/tools/update-prod-static
|
||||
mkdir -f "/home/zulip/prod-static"
|
||||
cp -rfT "$ZULIP_DEPLOY_PATH/prod-static/serve" "/home/zulip/prod-static"
|
||||
echo "Static files generated."
|
||||
fi
|
||||
set +e
|
||||
if ! su zulip -c "/home/zulip/deployments/current/manage.py migrate --noinput"; then
|
||||
local RETURN_CODE=$?
|
||||
|
||||
Reference in New Issue
Block a user