From 0184982f8c098d6ec9edae866d360e4233cb9096 Mon Sep 17 00:00:00 2001 From: Stiftung Development Date: Sun, 21 Sep 2025 22:55:37 +0200 Subject: [PATCH] Add production environment update instructions - Created PRODUCTION_ENV_UPDATE.md with step-by-step fix for CookieError - Provides SSH commands to add missing SESSION_COOKIE_NAME and CSRF_COOKIE_NAME - Includes verification steps to confirm fix works --- PRODUCTION_ENV_UPDATE.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 PRODUCTION_ENV_UPDATE.md diff --git a/PRODUCTION_ENV_UPDATE.md b/PRODUCTION_ENV_UPDATE.md new file mode 100644 index 0000000..0453b08 --- /dev/null +++ b/PRODUCTION_ENV_UPDATE.md @@ -0,0 +1,38 @@ +# URGENT: Production Environment Update Required + +## Issue +The production site is experiencing a CookieError due to missing session cookie configuration. + +## Fix Required +SSH into the production server and add these lines to the `/opt/stiftung/.env` file: + +```bash +# SSH into production server +ssh user@vhtv-stiftung.de + +# Navigate to stiftung directory +cd /opt/stiftung + +# Edit the .env file +nano .env + +# Add these lines to the .env file: +SESSION_COOKIE_NAME=stiftung_sessionid +CSRF_COOKIE_NAME=stiftung_csrftoken + +# Save and exit (Ctrl+X, Y, Enter) + +# Restart the containers to apply changes +docker-compose -f compose.yml restart web worker beat +``` + +## Background +- These new environment variables prevent session conflicts between the main Stiftung app and Paperless +- Without them, Django tries to set cookies with empty names, causing the CookieError +- The fix is already deployed in the code, but the environment variables need to be manually added to production + +## Verification +After adding the variables and restarting: +- Visit https://vhtv-stiftung.de/login/ +- Login should work without CookieError +- Both Stiftung and Paperless apps should maintain separate sessions \ No newline at end of file