forked from alfg/murmur-rest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
31 lines (23 loc) · 965 Bytes
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
settings.py
All default settings. No configuration required, unless you want to enable digest authentication.
:copyright: (C) 2014 by github.com/alfg.
:license: MIT, see README for more details.
"""
import os
# Settings for running a local dev server with runserver.py
APP_HOST = os.environ.get('APP_HOST', '0.0.0.0')
APP_PORT = os.environ.get('APP_PORT', 8080)
APP_DEBUG = os.environ.get('APP_DEBUG') == 'True'
# Ice connectivity
ICE_HOST = 'Meta:tcp -h localhost -p 6502'
ICE_SECRET = os.environ.get('ICE_SECRET', '')
ICE_MESSAGESIZE = 1024 # in KB - Ice default is 1024KB which is 1MB
SLICE_FILE = 'Murmur.ice'
# Default path of application
MURMUR_ROOT = os.path.dirname(os.path.abspath(__file__))
# Digest Authentication. Add users as necessary.
ENABLE_AUTH = os.environ.get('ENABLE_AUTH') == 'True'
# If ENABLE_AUTH enabled, add user credentials below
users = os.environ.get('USERS', '')
USERS = dict(item.split(':') for item in users.split(','))