Add env var options
This commit is contained in:
parent
64b5c3f7be
commit
2855e5b9b6
2 changed files with 7 additions and 1 deletions
|
@ -62,6 +62,10 @@ need to change this.
|
||||||
|
|
||||||
`REDIS_HOST` this should be set by Redis, but you can override it if you want. Defaults to `"localhost"`
|
`REDIS_HOST` this should be set by Redis, but you can override it if you want. Defaults to `"localhost"`
|
||||||
|
|
||||||
|
`REDIS_PORT` is the port redis is serving on, defaults to 6379
|
||||||
|
|
||||||
|
`SNAPPASS_REDIS_DB` is the database that you want to use on this redis server. Defaults to db 0
|
||||||
|
|
||||||
Docker
|
Docker
|
||||||
------
|
------
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,9 @@ app.config.update(
|
||||||
dict(STATIC_URL=os.environ.get('STATIC_URL', 'static')))
|
dict(STATIC_URL=os.environ.get('STATIC_URL', 'static')))
|
||||||
|
|
||||||
redis_host = os.environ.get('REDIS_HOST', 'localhost')
|
redis_host = os.environ.get('REDIS_HOST', 'localhost')
|
||||||
redis_client = redis.StrictRedis(host=redis_host, port=6379, db=0)
|
redis_port = os.environ.get('REDIS_PORT', 6379)
|
||||||
|
redis_db = os.environ.get('SNAPPASS_REDIS_DB', 0)
|
||||||
|
redis_client = redis.StrictRedis(host=redis_host, port=redis_port, db=redis_db)
|
||||||
|
|
||||||
time_conversion = {
|
time_conversion = {
|
||||||
'week': 604800,
|
'week': 604800,
|
||||||
|
|
Loading…
Reference in a new issue