Run migration script

This commit is contained in:
Girish Ramakrishnan 2020-03-09 10:02:03 -07:00
parent d6502a43cb
commit 00d7980af2

View file

@ -60,6 +60,9 @@ if grep -q "^SECRET_KEY_BASE=$" /app/data/env.production; then
PGPASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} psql -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE} \
-c "INSERT INTO settings (var, value) VALUES ('registrations_mode', 'none')"
fi
else
echo "==> Migrating database"
HOME=/app/data SAFETY_ASSURED=1 bundle exec rails db:migrate
fi
chown -R cloudron:cloudron /app/data /tmp/mastodon /run/mastodon