deploy: Add mailpit to test *sent* emails
All checks were successful
/ test (push) Successful in 52s

This commit is contained in:
lagertonne 2024-11-29 18:21:59 +01:00 committed by jedi
parent f7fda52fd0
commit 94c7e31e4b
4 changed files with 127 additions and 35 deletions

View file

@ -124,19 +124,12 @@ TEMPLATES = [
},
]
WSGI_APPLICATION = 'core.wsgi.application'
ASGI_APPLICATION = 'core.asgi.application'
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
if 'test' in sys.argv:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
else:
if os.getenv('DB_HOST') is not None:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
@ -149,6 +142,20 @@ else:
'charset': 'utf8mb4',
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
}
},
}
elif os.getenv('DB_FILE') is not None:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.getenv('DB_FILE', 'local.db'),
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}