Use 'permanent' session with a timeout

This commit is contained in:
2025-03-19 11:56:02 +01:00
parent fcf50ac7ab
commit 82668938af
2 changed files with 5 additions and 2 deletions

View File

@@ -51,9 +51,12 @@ After=network.target
[Service]
User=divault
WorkingDirectory=/srv/staticshield
Environment=FLASK_SERVE_DIR="/srv/a_static_website/html"
#StandardOutput=file:/srv/logs/staticshield.log
Environment=FLASK_SERVE_DIR="/srv/some_static_website/html"
Environment=FLASK_MOTHERSHIP="https://api.example.com/api/staticshield"
Environment=FLASK_SESSION_COOKIE_NAME="staticshield"
# Max session length of 2h
Environment=FLASK_PERMANENT_SESSION_LIFETIME=7200
ExecStart=/application/venvs/staticshield/bin/gunicorn -b localhost:8000 -w 4 staticshield:app
#ExecStart=/application/venvs/staticshield/bin/gunicorn -b unix:staticshield.sock -m 007 -w 4 staticshield:app
Restart=always