mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
[CHANGE] Updates for AA3
- SITE_URL introduced - Redis cache fixed (#1352) - Using the same type of quotes, not wildly mixing them
This commit is contained in:
parent
635fbfe2c8
commit
e247a94db3
@ -3,14 +3,20 @@ from .base import *
|
||||
|
||||
SECRET_KEY = os.environ.get("AA_SECRET_KEY")
|
||||
SITE_NAME = os.environ.get("AA_SITENAME")
|
||||
SITE_URL = (
|
||||
f"{os.environ.get('PROTOCOL')}"
|
||||
f"{os.environ.get('AUTH_SUBDOMAIN')}."
|
||||
f"{os.environ.get('DOMAIN')}"
|
||||
)
|
||||
CSRF_TRUSTED_ORIGINS = [SITE_URL]
|
||||
DEBUG = os.environ.get("AA_DEBUG", False)
|
||||
DATABASES['default'] = {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'NAME': os.environ.get("AA_DB_NAME"),
|
||||
'USER': os.environ.get("AA_DB_USER"),
|
||||
'PASSWORD': os.environ.get("AA_DB_PASSWORD"),
|
||||
'HOST': os.environ.get("AA_DB_HOST"),
|
||||
'PORT': os.environ.get("AA_DB_PORT", "3306"),
|
||||
DATABASES["default"] = {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"NAME": os.environ.get("AA_DB_NAME"),
|
||||
"USER": os.environ.get("AA_DB_USER"),
|
||||
"PASSWORD": os.environ.get("AA_DB_PASSWORD"),
|
||||
"HOST": os.environ.get("AA_DB_HOST"),
|
||||
"PORT": os.environ.get("AA_DB_PORT", "3306"),
|
||||
}
|
||||
|
||||
# Register an application at https://developers.eveonline.com for Authentication
|
||||
@ -21,9 +27,7 @@ DATABASES['default'] = {
|
||||
|
||||
ESI_SSO_CLIENT_ID = os.environ.get("ESI_SSO_CLIENT_ID")
|
||||
ESI_SSO_CLIENT_SECRET = os.environ.get("ESI_SSO_CLIENT_SECRET")
|
||||
ESI_SSO_CALLBACK_URL = (f"{os.environ.get('PROTOCOL')}"
|
||||
f"{os.environ.get('AUTH_SUBDOMAIN')}."
|
||||
f"{os.environ.get('DOMAIN')}/sso/callback")
|
||||
ESI_SSO_CALLBACK_URL = f"{SITE_URL}/sso/callback"
|
||||
ESI_USER_CONTACT_EMAIL = os.environ.get("ESI_USER_CONTACT_EMAIL") # A server maintainer that CCP can contact in case of issues.
|
||||
|
||||
# By default emails are validated before new users can log in.
|
||||
@ -40,40 +44,37 @@ EMAIL_HOST_PASSWORD = os.environ.get("AA_EMAIL_HOST_PASSWORD", "")
|
||||
EMAIL_USE_TLS = os.environ.get("AA_EMAIL_USE_TLS", True)
|
||||
DEFAULT_FROM_EMAIL = os.environ.get("AA_DEFAULT_FROM_EMAIL", "")
|
||||
|
||||
ROOT_URLCONF = 'myauth.urls'
|
||||
WSGI_APPLICATION = 'myauth.wsgi.application'
|
||||
ROOT_URLCONF = "myauth.urls"
|
||||
WSGI_APPLICATION = "myauth.wsgi.application"
|
||||
STATIC_ROOT = "/var/www/myauth/static/"
|
||||
BROKER_URL = F"redis://{os.environ.get('AA_REDIS', 'redis:6379')}/0"
|
||||
CELERY_RESULT_BACKEND = F"redis://{os.environ.get('AA_REDIS', 'redis:6379')}/0"
|
||||
BROKER_URL = f"redis://{os.environ.get('AA_REDIS', 'redis:6379')}/0"
|
||||
CELERY_RESULT_BACKEND = f"redis://{os.environ.get('AA_REDIS', 'redis:6379')}/0"
|
||||
CACHES = {
|
||||
"default": {
|
||||
"BACKEND": "redis_cache.RedisCache",
|
||||
"LOCATION": os.environ.get('AA_REDIS', 'redis:6379'),
|
||||
"OPTIONS": {
|
||||
"DB": 1,
|
||||
}
|
||||
"BACKEND": "django_redis.cache.RedisCache",
|
||||
"LOCATION": f"redis://{os.environ.get('AA_REDIS', 'redis:6379')}/1", # change the 1 here to change the database used
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Add any additional apps to this list.
|
||||
INSTALLED_APPS += [
|
||||
# https://allianceauth.readthedocs.io/en/latest/features/apps/index.html
|
||||
# 'allianceauth.corputils',
|
||||
# 'allianceauth.fleetactivitytracking',
|
||||
# 'allianceauth.optimer',
|
||||
# 'allianceauth.permissions_tool',
|
||||
# 'allianceauth.srp',
|
||||
# 'allianceauth.timerboard',
|
||||
|
||||
# https://allianceauth.readthedocs.io/en/latest/features/services/index.html
|
||||
# 'allianceauth.services.modules.discord',
|
||||
# 'allianceauth.services.modules.discourse',
|
||||
# 'allianceauth.services.modules.ips4',
|
||||
# 'allianceauth.services.modules.openfire',
|
||||
# 'allianceauth.services.modules.phpbb3',
|
||||
# 'allianceauth.services.modules.smf',
|
||||
# 'allianceauth.services.modules.teamspeak3',
|
||||
# 'allianceauth.services.modules.xenforo',
|
||||
# https://allianceauth.readthedocs.io/en/latest/features/apps/index.html
|
||||
# 'allianceauth.corputils',
|
||||
# 'allianceauth.fleetactivitytracking',
|
||||
# 'allianceauth.optimer',
|
||||
# 'allianceauth.permissions_tool',
|
||||
# 'allianceauth.srp',
|
||||
# 'allianceauth.timerboard',
|
||||
# https://allianceauth.readthedocs.io/en/latest/features/services/index.html
|
||||
# 'allianceauth.services.modules.discord',
|
||||
# 'allianceauth.services.modules.discourse',
|
||||
# 'allianceauth.services.modules.ips4',
|
||||
# 'allianceauth.services.modules.openfire',
|
||||
# 'allianceauth.services.modules.phpbb3',
|
||||
# 'allianceauth.services.modules.smf',
|
||||
# 'allianceauth.services.modules.teamspeak3',
|
||||
# 'allianceauth.services.modules.xenforo',
|
||||
]
|
||||
|
||||
#######################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user