network_inventory/src/network_inventory/settings/production.py

34 lines
742 B
Python
Raw Normal View History

2022-03-27 16:13:34 +02:00
from socket import gethostname
from socket import gethostbyname
from socket import getfqdn
from .base import *
2022-03-27 16:13:34 +02:00
ALLOWED_HOSTS = [
2022-03-27 16:13:34 +02:00
"localhost",
"127.0.0.1",
getfqdn(),
gethostname(),
gethostbyname(gethostname()),
os.getenv("DOMAIN"),
]
# SECURITY WARNING: keep the secret key used in production secret!
2022-12-12 10:07:29 +01:00
SECRET_KEY = os.getenv("DJANGO_SECRET_KEY")
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
CRISPY_FAIL_SILENTLY = not DEBUG
DATABASES = {
2022-03-27 14:50:44 +02:00
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": os.environ.get("DJANGO_POSTGRES_PASSWORD"),
2022-03-27 14:50:44 +02:00
"HOST": "db",
"PORT": 5432,
}
}