1
mirror of https://github.com/jakejarvis/mastodon-utils.git synced 2025-11-04 10:20:11 -05:00

add postgres & pgbouncer notes

This commit is contained in:
2022-12-11 10:04:28 -05:00
parent de1edc8fe0
commit a520efcc55
3 changed files with 91 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ sudo -u mastodon "$RBENV_ROOT/bin/rbenv" global "$RUBY_VERSION"
# run migrations:
# https://docs.joinmastodon.org/admin/upgrading/
echo "Running pre-deploy database migrations..."
sudo -u mastodon SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production "$RBENV_ROOT/shims/bundle" exec rails db:migrate
sudo -u mastodon SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production DB_PORT=5432 "$RBENV_ROOT/shims/bundle" exec rails db:migrate
# restart mastodon
echo "Restarting services (round 1/2)..."
@@ -50,7 +50,7 @@ sudo systemctl restart mastodon-web mastodon-sidekiq mastodon-streaming
echo "Clearing cache..."
sudo -u mastodon RAILS_ENV=production "$RBENV_ROOT/shims/ruby" "$APP_ROOT/bin/tootctl" cache clear
echo "Running post-deploy database migrations..."
sudo -u mastodon RAILS_ENV=production "$RBENV_ROOT/shims/bundle" exec rails db:migrate
sudo -u mastodon RAILS_ENV=production DB_PORT=5432 "$RBENV_ROOT/shims/bundle" exec rails db:migrate
# restart mastodon again
echo "Restarting services (round 2/2)..."