From 3b7e47dbe2669a8c45bec4d7c99b583996689da8 Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Wed, 9 Oct 2019 14:30:53 +0200 Subject: [PATCH] settings(minor): use cached_db for session, use localhost as domain --- README.md | 1 + docker-compose.yml | 2 ++ passbook/lib/default.yml | 2 +- passbook/root/settings.py | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3db952d01..11172f736 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ## Quick instance ``` +export PASSBOOK_DOMAIN=domain.tld docker-compose pull docker-compose up -d docker-compose exec server ./manage.py migrate diff --git a/docker-compose.yml b/docker-compose.yml index 3da8514e3..1c391f410 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,7 @@ services: - uwsgi - uwsgi.ini environment: + - PASSBOOK_DOMAIN=${PASSBOOK_DOMAIN} - PASSBOOK_REDIS__HOST=redis - PASSBOOK_POSTGRESQL__HOST=postgresql - PASSBOOK_POSTGRESQL__PASSWORD=${PG_PASS:-thisisnotagoodpassword} @@ -53,6 +54,7 @@ services: labels: - traefik.enable=false environment: + - PASSBOOK_DOMAIN=${PASSBOOK_DOMAIN} - PASSBOOK_REDIS__HOST=redis - PASSBOOK_POSTGRESQL__HOST=postgresql - PASSBOOK_POSTGRESQL__PASSWORD=${PG_PASS:-thisisnotagoodpassword} diff --git a/passbook/lib/default.yml b/passbook/lib/default.yml index 8c0119294..57ef14365 100644 --- a/passbook/lib/default.yml +++ b/passbook/lib/default.yml @@ -16,7 +16,7 @@ debug: false # Error reporting, sends stacktrace to sentry.services.beryju.org error_report_enabled: true -domain: passbook.local +domain: localhost passbook: sign_up: diff --git a/passbook/root/settings.py b/passbook/root/settings.py index dab4d9021..e09dfe6eb 100644 --- a/passbook/root/settings.py +++ b/passbook/root/settings.py @@ -117,7 +117,7 @@ CACHES = { } DJANGO_REDIS_IGNORE_EXCEPTIONS = True DJANGO_REDIS_LOG_IGNORED_EXCEPTIONS = True -SESSION_ENGINE = "django.contrib.sessions.backends.cache" +SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" SESSION_CACHE_ALIAS = "default" MIDDLEWARE = [