guild-journal/guild_journal/settings/production.py

30 lines
691 B
Python

import os
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent.parent
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ["SECRET_KEY"]
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = os.environ.get("DJANGO_HOST").split(",")
CSRF_TRUSTED_ORIGINS = [
"https://" + host for host in os.environ.get("DJANGO_HOST").split(",")
]
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "/data/db.sqlite3",
}
}
MEDIA_ROOT = "/data/media"
MEDIA_URL = "/media/"