mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-12 23:02:20 +01:00
Add Docker build and docker compose file
This commit is contained in:
49
marietje/marietje/settings/production.py
Normal file
49
marietje/marietje/settings/production.py
Normal file
@ -0,0 +1,49 @@
|
||||
import os
|
||||
|
||||
from .base import *
|
||||
|
||||
SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY")
|
||||
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = [os.environ.get("DJANGO_ALLOWED_HOST")]
|
||||
|
||||
SESSION_COOKIE_SECURE = True
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': os.environ.get("DJANGO_MYSQL_NAME"),
|
||||
'USER': os.environ.get("DJANGO_MYSQL_USER"),
|
||||
'PASSWORD': os.environ.get("DJANGO_MYSQL_PASSWORD"),
|
||||
'HOST': os.environ.get("DJANGO_MYSQL_HOST"),
|
||||
'PORT': os.environ.get("DJANGO_MYSQL_PORT"),
|
||||
'OPTIONS': {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"},
|
||||
}
|
||||
}
|
||||
|
||||
# Logging
|
||||
# https://docs.djangoproject.com/en/3.2/topics/logging/
|
||||
|
||||
LOGGING = {
|
||||
"version": 1,
|
||||
"disable_existing_loggers": False,
|
||||
"handlers": {
|
||||
"file": {
|
||||
"level": "INFO",
|
||||
"class": "logging.FileHandler",
|
||||
"filename": "/marietje/log/django.log",
|
||||
},
|
||||
},
|
||||
"loggers": {
|
||||
"": {
|
||||
"handlers": ["file"],
|
||||
"level": "DEBUG",
|
||||
"propagate": True,
|
||||
}, # noqa
|
||||
}, # noqa
|
||||
}
|
||||
|
||||
BASE_URL = 'https://marietje-zuid.science.ru.nl'
|
||||
|
||||
BERTHA_HOST = (os.environ.get("DJANGO_BERTHA_HOST"), os.environ.get("DJANGO_BERTHA_PORT"))
|
||||
@ -1,23 +0,0 @@
|
||||
from .base import *
|
||||
|
||||
SECRET_KEY = '******'
|
||||
|
||||
DEBUG = False
|
||||
|
||||
ALLOWED_HOSTS = ['marietje-zuid.nl']
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': 'marietje',
|
||||
'USER': 'marietje',
|
||||
'PASSWORD': '******',
|
||||
'HOST': 'localhost',
|
||||
'PORT': '3306',
|
||||
'OPTIONS': {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"},
|
||||
}
|
||||
}
|
||||
|
||||
BASE_URL = 'https://marietje-zuid.science.ru.nl'
|
||||
|
||||
BERTHA_HOST = ('bach.science.ru.nl', 1234)
|
||||
Reference in New Issue
Block a user