Skip to content

Commit

Permalink
Generate the static files in the entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
galexrt committed Nov 6, 2015
1 parent 64fe59c commit a7a7c99
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?
Expand Down

0 comments on commit a7a7c99

Please sign in to comment.