You've already forked snikket-web-portal
12-factorize application a little
snikket_web can now be fully configured via the environment alone, no extra files needed. It is still supported to inject a python file to generate environment variables though, which may be useful for generating and reloading a secret key.
This commit is contained in:
11
example.env.py
Normal file
11
example.env.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Please see example.env for a detailed list of supported environment
|
||||
# variables as well as their semantics.
|
||||
|
||||
# NOTE: this file is not meant for production use. Due to the non-constant
|
||||
# secret key, each server restart will log out all users from the web portal.
|
||||
|
||||
import secrets
|
||||
SNIKKET_WEB_SECRET_KEY = secrets.token_urlsafe(nbytes=32)
|
||||
SNIKKET_WEB_PROSODY_ENDPOINT = "http://localhost:5280"
|
||||
SNIKKET_WEB_DOMAIN = "localhost"
|
||||
# SNIKKET_WEB_AVATAR_CACHE_TTL = 1800
|
||||
Reference in New Issue
Block a user