Commit 4e211a33 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

We should fix application_settings before we shutdown postgres

parent 613cd5fe
...@@ -91,6 +91,8 @@ all: database-config resque-yml nginx-conf ...@@ -91,6 +91,8 @@ all: database-config resque-yml nginx-conf
sudo -u git -H sh -c "/srv/gitlab/bin/daemon_with_pidfile /run/gitlab/gitaly.pid /srv/gitaly/gitaly /srv/gitaly/config.toml >> /srv/gitlab/log/gitaly.log 2>&1 &" sudo -u git -H sh -c "/srv/gitlab/bin/daemon_with_pidfile /run/gitlab/gitaly.pid /srv/gitaly/gitaly /srv/gitaly/config.toml >> /srv/gitlab/log/gitaly.log 2>&1 &"
cd /srv/gitlab && sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production force=yes cd /srv/gitlab && sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production force=yes
cd /srv/gitlab && sudo -u git -H HOME=$(CURDIR)/gitlab-home PATH=$$PATH:$(CURDIR)/../go/go/bin GOCACHE=$(CURDIR)/gitlab-home/gocache bundle exec rake gitlab:env:info RAILS_ENV=production cd /srv/gitlab && sudo -u git -H HOME=$(CURDIR)/gitlab-home PATH=$$PATH:$(CURDIR)/../go/go/bin GOCACHE=$(CURDIR)/gitlab-home/gocache bundle exec rake gitlab:env:info RAILS_ENV=production
cd /srv/gitlab && sudo -u git -H mv -f config/secrets.yml.example config/secrets.yml
sudo -u git psql -d gitlabhq_production -c "UPDATE application_settings SET runners_registration_token_encrypted = null;"
sudo -u postgres /usr/bin/pg_ctl -s -D /srv/pgsql/data stop -m fast sudo -u postgres /usr/bin/pg_ctl -s -D /srv/pgsql/data stop -m fast
sudo -u git /usr/bin/redis-cli shutdown nosave sudo -u git /usr/bin/redis-cli shutdown nosave
...@@ -107,9 +109,6 @@ all: database-config resque-yml nginx-conf ...@@ -107,9 +109,6 @@ all: database-config resque-yml nginx-conf
sed -e "s/\$$app_root\/tmp\/pids/\/run\/gitlab/" -i /etc/default/gitlab sed -e "s/\$$app_root\/tmp\/pids/\/run\/gitlab/" -i /etc/default/gitlab
systemctl enable gitlab.service systemctl enable gitlab.service
cd /srv/gitlab && sudo -u git -H mv -f config/secrets.yml.example config/secrets.yml
sudo -u git psql -d gitlabhq_production -c "UPDATE application_settings SET runners_registration_token_encrypted = null;"
rm -rf /usr/local/share/.yarnrc rm -rf /usr/local/share/.yarnrc
/bin/sh cleanup gitlab dev doc git tests cache ports man patches node_modules windows macos bytecode maps packed_assets /bin/sh cleanup gitlab dev doc git tests cache ports man patches node_modules windows macos bytecode maps packed_assets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment