зеркало из https://github.com/mozilla/treeherder.git
Do not initialize data if DATABASE_URL is set (#6175)
This commit is contained in:
Родитель
82430b5230
Коммит
1ff6e16cdd
|
@ -2,10 +2,14 @@
|
|||
# Make non-zero exit codes & other errors fatal.
|
||||
set -euo pipefail
|
||||
|
||||
echo '-----> Running Django migrations and loading reference data'
|
||||
./manage.py migrate --noinput
|
||||
./manage.py load_initial_data
|
||||
echo '-----> Initialize SETA'
|
||||
./manage.py initialize_seta
|
||||
# Only execute if we're using the Mysql container
|
||||
if [ "${DATABASE_URL}" == "mysql://root@mysql/treeherder" ]; then
|
||||
# Initialize migrations and SETA
|
||||
echo '-----> Running Django migrations and loading reference data'
|
||||
./manage.py migrate --noinput
|
||||
./manage.py load_initial_data
|
||||
echo '-----> Initialize SETA'
|
||||
./manage.py initialize_seta
|
||||
fi
|
||||
|
||||
exec "$@"
|
Загрузка…
Ссылка в новой задаче