Allow running without redis

main
Alexander Graf 2 years ago
parent c507b765be
commit 1d90dc3ea3
No known key found for this signature in database
GPG Key ID: B8A9DC143E075629

@ -151,8 +151,9 @@ class ConfigManager:
template = self.DB_TEMPLATES[self.config['DB_FLAVOR']]
self.config['SQLALCHEMY_DATABASE_URI'] = template.format(**self.config)
self.config['RATELIMIT_STORAGE_URL'] = f'redis://{self.config["REDIS_ADDRESS"]}/2'
self.config['QUOTA_STORAGE_URL'] = f'redis://{self.config["REDIS_ADDRESS"]}/1'
# remove? self.config['QUOTA_STORAGE_URL'] = f'redis://{self.config["REDIS_ADDRESS"]}/1'
if not self.config.get('RATELIMIT_STORAGE_URL'):
self.config['RATELIMIT_STORAGE_URL'] = f'redis://{self.config["REDIS_ADDRESS"]}/2'
self.config['SESSION_STORAGE_URL'] = f'redis://{self.config["REDIS_ADDRESS"]}/3'
self.config['SESSION_COOKIE_SAMESITE'] = 'Strict'
self.config['SESSION_COOKIE_HTTPONLY'] = True

@ -56,6 +56,7 @@ RUN set -euxo pipefail \
ENV FLASK_ENV=development
ENV MEMORY_SESSIONS=true
ENV RATELIMIT_STORAGE_URL="memory://"
ENV SESSION_COOKIE_SECURE=false
ENV DEBUG=true

Loading…
Cancel
Save