network_inventory/src/network_inventory/settings/docker.py

31 lines
647 B
Python
Raw Normal View History

2022-03-27 16:13:34 +02:00
from socket import gethostname
from socket import gethostbyname_ex
2019-07-13 12:37:58 +02:00
from .base import *
2022-03-27 16:13:34 +02:00
ALLOWED_HOSTS = [
gethostname(),
] + list(set(gethostbyname_ex(gethostname())[2]))
2019-07-13 12:37:58 +02:00
2021-12-28 17:45:46 +01:00
CSRF_TRUSTED_ORIGINS = [
2022-03-27 14:50:44 +02:00
"http://localhost:8080",
2021-12-28 17:45:46 +01:00
]
2019-07-13 12:37:58 +02:00
# SECURITY WARNING: keep the secret key used in production secret!
2022-03-27 14:50:44 +02:00
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY")
2022-03-27 14:50:44 +02:00
DEBUG = os.environ.get("DJANGO_DEBUG")
CRISPY_FAIL_SILENTLY = not DEBUG
2019-07-13 12:37:58 +02:00
DATABASES = {
2022-03-27 14:50:44 +02:00
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"HOST": "db",
"PORT": 5432,
"PASSWORD": "password",
2019-07-13 12:37:58 +02:00
}
}