Merge branch '130-anpassungen-fur-produktivserverbetrieb' into 'master'
Änderungen zum Produktivbetrieb Closes #130 See merge request enrichment-2024/qivip!89
This commit is contained in:
@@ -31,8 +31,9 @@ load_dotenv(env_path)
|
|||||||
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'django-insecure-&psk#na5l=p3q8_a+-$4w1f^lt3lx1c@d*p4x$ymm_rn7pwb87')
|
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'django-insecure-&psk#na5l=p3q8_a+-$4w1f^lt3lx1c@d*p4x$ymm_rn7pwb87')
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
#DEBUG = True
|
DEBUG = True
|
||||||
DEBUG = os.environ.get('DJANGO_DEBUG', '') != 'False'
|
#DEBUG = False
|
||||||
|
#DEBUG = os.environ.get('DJANGO_DEBUG', '') != 'False'
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '*']
|
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '*']
|
||||||
|
|
||||||
@@ -93,7 +94,7 @@ CHANNEL_LAYERS = {
|
|||||||
"default": {
|
"default": {
|
||||||
"BACKEND": "channels_redis.core.RedisChannelLayer",
|
"BACKEND": "channels_redis.core.RedisChannelLayer",
|
||||||
"CONFIG": {
|
"CONFIG": {
|
||||||
"hosts": [("127.0.0.1", 6379)],
|
"hosts": [("127.0.0.1", 6380)],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -159,7 +160,7 @@ STATIC_ROOT = BASE_DIR / "staticfiles"
|
|||||||
STATICFILES_DIRS = [BASE_DIR / 'static']
|
STATICFILES_DIRS = [BASE_DIR / 'static']
|
||||||
|
|
||||||
# WhiteNoise configuration
|
# WhiteNoise configuration
|
||||||
STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage'
|
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||||
WHITENOISE_SKIP_COMPRESS_EXTENSIONS = ['css', 'js']
|
WHITENOISE_SKIP_COMPRESS_EXTENSIONS = ['css', 'js']
|
||||||
# Return 404 instead of 500 for missing files
|
# Return 404 instead of 500 for missing files
|
||||||
WHITENOISE_MISSING_FILE_ERRNO = None
|
WHITENOISE_MISSING_FILE_ERRNO = None
|
||||||
@@ -174,3 +175,13 @@ import os
|
|||||||
|
|
||||||
MEDIA_URL = '/media/' # URL, um auf Medien-Dateien zuzugreifen
|
MEDIA_URL = '/media/' # URL, um auf Medien-Dateien zuzugreifen
|
||||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') # Speicherort für hochgeladene Dateien
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') # Speicherort für hochgeladene Dateien
|
||||||
|
|
||||||
|
# Email Settings
|
||||||
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
|
EMAIL_HOST = 'postoffice.katharineum.de'
|
||||||
|
EMAIL_PORT = 587 # 25
|
||||||
|
EMAIL_USE_TLS = True
|
||||||
|
EMAIL_HOST_USER = 'qivip-mail@katharineum.de'
|
||||||
|
EMAIL_HOST_PASSWORD = '<password>'
|
||||||
|
EMAIL_USE_SSL = False
|
||||||
|
DEFAULT_FROM_EMAIL = 'qivip-mail@katharineum.de'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ game_connections = {}
|
|||||||
|
|
||||||
class LobbyConsumer(AsyncWebsocketConsumer):
|
class LobbyConsumer(AsyncWebsocketConsumer):
|
||||||
|
|
||||||
r = redis.Redis(host='localhost', port=6379, db=0, decode_responses=True)
|
r = redis.Redis(host='localhost', port=6380, db=0, decode_responses=True)
|
||||||
|
|
||||||
async def connect(self):
|
async def connect(self):
|
||||||
self.join_code = self.scope['url_route']['kwargs']['join_code']
|
self.join_code = self.scope['url_route']['kwargs']['join_code']
|
||||||
@@ -147,7 +147,7 @@ class LobbyConsumer(AsyncWebsocketConsumer):
|
|||||||
|
|
||||||
# Zustand laden
|
# Zustand laden
|
||||||
try:
|
try:
|
||||||
r = redis.Redis(host='localhost', port=6379, db=0, decode_responses=True)
|
r = redis.Redis(host='localhost', port=6380, db=0, decode_responses=True)
|
||||||
|
|
||||||
# Alte Teilnehmer aus Redis holen
|
# Alte Teilnehmer aus Redis holen
|
||||||
data = r.get(f"last_participants_{self.room_group_name}")
|
data = r.get(f"last_participants_{self.room_group_name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user