mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-11-16 03:41:27 +00:00
"Generate" the prod-static files in the Dockerfile
The zulip script update-prod-static isn't working, so we have to download a tarball and use the prod-static files folder
This commit is contained in:
@@ -29,6 +29,9 @@ 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/next" && \
|
||||||
ln -nsf "$ZULIP_DEPLOY_PATH" "/home/zulip/deployments/current" && \
|
ln -nsf "$ZULIP_DEPLOY_PATH" "/home/zulip/deployments/current" && \
|
||||||
ln -nsf /etc/zulip/settings.py "$ZULIP_DEPLOY_PATH/zproject/local_settings.py" && \
|
ln -nsf /etc/zulip/settings.py "$ZULIP_DEPLOY_PATH/zproject/local_settings.py" && \
|
||||||
|
wget https://www.zulip.com/dist/releases/zulip-server-latest.tar.gz -O /tmp/zulip-server.tar.gz && \
|
||||||
|
tar xfz zulip-server.tar.gz -C "/home/zulip/prod-static" --strip-components=3 --wildcards */prod-static/serve && \
|
||||||
|
rm -rf /tmp/zulip-server.tar.gz && \
|
||||||
chown -R zulip:zulip /home/zulip /var/log/zulip /etc/zulip/settings.py && \
|
chown -R zulip:zulip /home/zulip /var/log/zulip /etc/zulip/settings.py && \
|
||||||
apt-get -qq autoremove --purge -y && \
|
apt-get -qq autoremove --purge -y && \
|
||||||
apt-get -qq clean && \
|
apt-get -qq clean && \
|
||||||
|
|||||||
@@ -406,13 +406,6 @@ zulipFirstStartInit() {
|
|||||||
echo "First Start Init not needed."
|
echo "First Start Init not needed."
|
||||||
return 0
|
return 0
|
||||||
fi
|
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
|
set +e
|
||||||
if ! su zulip -c "/home/zulip/deployments/current/manage.py migrate --noinput"; then
|
if ! su zulip -c "/home/zulip/deployments/current/manage.py migrate --noinput"; then
|
||||||
local RETURN_CODE=$?
|
local RETURN_CODE=$?
|
||||||
|
|||||||
Reference in New Issue
Block a user