mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 23:04:21 +00:00
🔧 Configure basic database
This commit is contained in:
parent
26b75cf7d2
commit
f57eb85b20
1 changed files with 10 additions and 3 deletions
|
@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
|
||||
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", "change-me-in-production")
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = bool(os.environ.get("DJANGO_DEBUG"))
|
||||
|
@ -77,11 +77,18 @@ WSGI_APPLICATION = 'sophon.wsgi.application'
|
|||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'HOST': '', # Connect via UNIX socket (does not work on Windows)
|
||||
'NAME': 'sophon',
|
||||
'USER': 'sophon', # Connect using its own user, isolating sophon from the rest of the server
|
||||
}
|
||||
}
|
||||
|
||||
# Remember to run the following commands on a new installation:
|
||||
# sudo -iu postgres
|
||||
# createuser sophon
|
||||
# createdb --owner=sophon sophon
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
|
||||
|
|
Loading…
Reference in a new issue