Skip to content

Commit cfd1d9a

Browse files
committed
fix(boot): make wsgi aware of what settings file to use (production)
boot script and friends worked just fine because the settings were passed to it but wsgi.py auto uses settings.py if nothing else is passed in
1 parent 4cb7dae commit cfd1d9a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

rootfs/api/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def get(self, request):
3838
c.execute("SELECT 0")
3939
except django.db.Error as e:
4040
logger.critical("Database health check failed")
41+
# FIXME why is turning on DEBUG=true in env not outputting this error?
4142
logger.debug(str(e))
4243

4344
return HttpResponse(

rootfs/bin/boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ echo "Database Migrations:"
3333
sudo -E -u deis python /app/manage.py migrate --settings deis.production --noinput
3434

3535
# spawn a gunicorn server in the background
36-
sudo -E -u deis gunicorn -c /app/deis/gconf.py deis.wsgi &
36+
sudo -E -u deis gunicorn --env DJANGO_SETTINGS_MODULE=deis.production -c /app/deis/gconf.py deis.wsgi &
3737

3838
python /app/manage.py load_db_state_to_k8s --settings deis.production
3939

0 commit comments

Comments
 (0)