#!/bin/sh
# if [ "x$(id -un)" != "xdiscourse" ] ; then
#   echo "Please run this script as discourse user" 1>&2
#   exit 1
# fi
export RAILS_ENV="${RAILS_ENV:=production}"
cd /srv/www/vhosts/gitlab-ce/
/usr/bin/bundle.ruby2.3 exec /usr/bin/rake.ruby2.3 db:migrate assets:clean assets:precompile webpack:compile cache:clear
chown -R gitlab:gitlab tmp/
chmod -R go+rX public/
