Skip to content

Commit 2a76033

Browse files
committed
feat(settings): use k8s 1.2 secrets as env vars to configure production settings
1 parent 559aff3 commit 2a76033

3 files changed

Lines changed: 6 additions & 22 deletions

File tree

rootfs/bin/boot

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ else
2424
fi
2525

2626
echo "Django checks:"
27-
python /app/manage.py check --settings deis.production --deploy api
27+
python /app/manage.py check --deploy api
2828

2929
echo "Health Checks:"
30-
python /app/manage.py healthchecks --settings deis.production
30+
python /app/manage.py healthchecks
3131

3232
echo "Database Migrations:"
33-
sudo -E -u deis python /app/manage.py migrate --settings deis.production --noinput
33+
sudo -E -u deis python /app/manage.py migrate --noinput
3434

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

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

4040
# smart shutdown on SIGTERM (SIGINT is handled by gunicorn)
4141
function on_exit() {

rootfs/deis/production.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

rootfs/deis/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
DATABASES = {
286286
'default': {
287287
'ENGINE': 'django.db.backends.postgresql',
288-
'NAME': os.environ.get('DEIS_DATABASE_NAME', 'deis'),
288+
'NAME': os.environ.get('DEIS_DATABASE_NAME', os.environ.get('DEIS_DATABASE_USER', 'deis')),
289289
'USER': os.environ.get('DEIS_DATABASE_USER', ''),
290290
'PASSWORD': os.environ.get('DEIS_DATABASE_PASSWORD', ''),
291291
'HOST': os.environ.get('DEIS_DATABASE_SERVICE_HOST', ''),

0 commit comments

Comments
 (0)