Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
init-dbmigration.sh 401 B
#!/bin/bash

# Replace environment variables
# This is mandatory as at the time of doing the migration, discourse needs to know redis IP,
# which is set thanks to discourse.conf file.
echo "--> Overwritting env variables ..."
envsubst < /tmp/discourse-configmap/discourse.conf > /discourse/config/discourse.conf
echo "--> DONE"

# Migrate db
exec env RAILS_ENV="production" bundle exec rake db:migrate