Skip to content

Commit

Permalink
Merge pull request #28 from tofu-rocketry/prod-config
Browse files Browse the repository at this point in the history
Prod config
  • Loading branch information
tofu-rocketry authored Dec 4, 2024
2 parents a92afbb + 64d7871 commit 2572081
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions monitoring/settings.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This file will be parsed by settings.py.

[common]
# A new key can be generated using django.core.management.utils.get_random_secret_key()
secret_key =

# `allowed_hosts` values should be comma separated list of hostnames (fqdn's)
allowed_hosts =

Expand Down
10 changes: 5 additions & 5 deletions monitoring/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ge^fd9rf)htmxji8kf=jk8frh3=^11@^n=h14gu*fqt^0-lnr$'
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False

try:

Expand All @@ -33,6 +30,9 @@
file_path = os.path.join(BASE_DIR, 'monitoring', 'settings.ini')
cp.read(file_path)

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = cp.get('common', 'secret_key')

ALLOWED_HOSTS = cp.get('common', 'allowed_hosts').split(',')

# Database
Expand Down

0 comments on commit 2572081

Please sign in to comment.