Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Allow configuring the JWT settings in docker

Roland Geider4a60a9315238
diff --git a/extras/docker/development/settings.py b/extras/docker/development/settings.py
index 8c707b7c0..311fb3e02 100644
--- a/extras/docker/development/settings.py
+++ b/extras/docker/development/settings.py
@@ -44,7 +44,7 @@ else:
TIME_ZONE = env.str("TIME_ZONE", 'Europe/Berlin')
# Make this unique, and don't share it with anybody.
-SECRET_KEY = env.str("SECRET_KEY", 'wger-django-secret-key')
+SECRET_KEY = env.str("SECRET_KEY", 'wger-docker-supersecret-key-1234567890!@#$%^&*(-_)')
# Your reCaptcha keys
@@ -115,3 +115,10 @@ COMPRESS_ROOT = STATIC_ROOT
# The site's domain as used by the email verification workflow
EMAIL_PAGE_DOMAIN = 'http://localhost/'
+
+#
+# Django Rest Framework SimpleJWT
+#
+SIMPLE_JWT['ACCESS_TOKEN_LIFETIME'] = timedelta(minutes=env.int("ACCESS_TOKEN_LIFETIME", 15))
+SIMPLE_JWT['REFRESH_TOKEN_LIFETIME'] = timedelta(hours=env.int("REFRESH_TOKEN_LIFETIME", 24))
+SIMPLE_JWT['SIGNING_KEY'] = env.str("SIGNING_KEY", SECRET_KEY)