Something went wrong on our end
-
Ismael Posada Trobo authored
- Fixes on environment variables (now they will be managed from env-configmap configmap). - Fixes on discourse.conf (belonging to discourse-configmap) to adequate to the new infra. - Some minor fixes. New image of ruby from 2.4.2 to 2.5.0.
Ismael Posada Trobo authored- Fixes on environment variables (now they will be managed from env-configmap configmap). - Fixes on discourse.conf (belonging to discourse-configmap) to adequate to the new infra. - Some minor fixes. New image of ruby from 2.4.2 to 2.5.0.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
init-dbmigration.sh 768 B
#!/bin/bash
# If there are files in /tmp/configmap that are not empty
# (overriden by a ConfigMap) copy them to /discourse/config
if [ -n "$(ls -A /tmp/discourse-configmap)" ]
then
for f in /tmp/discourse-configmap/*
do
if [ -s $f ]
then
cp /tmp/discourse-configmap/* /discourse/config/
fi
done
fi
# 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"
# Set environment as production
export RAILS_ENV="production"
# Create or Migrate DB
exec bundle exec rake db:create db:migrate