Merge pull request #23 from pinterest/more-env-vars
Add ENV variables options
This commit is contained in:
commit
c22c902de6
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_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
|
||||
------
|
||||
|
||||
|
|
|
@ -15,7 +15,9 @@ app.config.update(
|
|||
dict(STATIC_URL=os.environ.get('STATIC_URL', 'static')))
|
||||
|
||||
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 = {
|
||||
'week': 604800,
|
||||
|
|
Loading…
Reference in a new issue