Skip to content

Commit 64e1034

Browse files
committed
Remove only sensitive info from dev_settings
1 parent 07533fb commit 64e1034

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

backend/dev_settings.py

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
from datetime import timedelta
1515
from settings import *
1616

17+
try:
18+
from dev_settings_real import *
19+
except ImportError:
20+
print("couldnt import")
21+
pass
22+
1723
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
1824
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1925

@@ -22,7 +28,7 @@
2228
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
2329

2430
# SECURITY WARNING: keep the secret key used in production secret!
25-
SECRET_KEY = "redacted"
31+
# SECRET_KEY = "redacted"
2632

2733
# SECURITY WARNING: don't run with debug turned on in production!
2834
DEBUG = True
@@ -35,17 +41,18 @@
3541
# Database
3642
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
3743

38-
DATABASES = {
39-
'default': {
40-
'ENGINE': 'django.db.backends.postgresql_psycopg2',
41-
'NAME': 'battlecode',
42-
'USER': 'battlecode',
43-
'PASSWORD': 'redacted',
44-
'HOST': 'redacted',
45-
'PORT': 5432,
46-
}
47-
}
44+
# DATABASES = {
45+
# 'default': {
46+
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
47+
# 'NAME': 'battlecode',
48+
# 'USER': 'battlecode',
49+
# 'PASSWORD': 'redacted',
50+
# 'HOST': 'redacted',
51+
# 'PORT': 5432,
52+
# }
53+
# }
54+
55+
# GOOGLE_APPLICATION_CREDENTIALS = r"""redacted"""
4856

49-
GOOGLE_APPLICATION_CREDENTIALS = r"""redacted"""
57+
# SENDGRID_API_KEY = "redacted"
5058

51-
SENDGRID_API_KEY = "redacted"

docker-compose-b.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
ports:
2323
- 8000:80
2424
environment:
25-
- DJANGO_SETTINGS_MODULE=dev_settings_real
25+
- DJANGO_SETTINGS_MODULE=dev_settings
2626
- DB_HOST_BC_DEV=db
2727
# command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; python manage.py migrate && uwsgi --ini uwsgi.ini'
2828
command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:80'

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ services:
2727
ports:
2828
- 8000:80
2929
environment:
30-
- DJANGO_SETTINGS_MODULE=dev_settings_real
30+
- DJANGO_SETTINGS_MODULE=dev_settings
3131
- DB_HOST_BC_DEV=db
3232
# command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; python manage.py migrate && uwsgi --ini uwsgi.ini'
3333
command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; python manage.py migrate && python manage.py runserver 0.0.0.0:80'

0 commit comments

Comments
 (0)