forked from EpocDotFr/webtodotxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.docker.py
37 lines (33 loc) · 1009 Bytes
/
config.docker.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
32
33
34
35
36
37
from os import getenv
from json import loads
def _env(var_name, default):
val = getenv(var_name)
if val is not None:
try:
val = loads(val)
except ValueError:
pass
return val
return default
SECRET_KEY = _env('SECRET_KEY', 'this-is-not-a-secret-key!')
ENV = _env('ENV', 'production')
USERS = _env("USER_DICT", {})
FORCE_LANGUAGE = None
DEFAULT_LANGUAGE = 'en'
TITLE = None
DISPLAY_CREATION_DATE = True
AUTH_BACKEND_TO_USE = _env('AUTH_BACKEND', 'DictAuth')
STORAGE_BACKEND_TO_USE = _env('STORAGE_BACKEND', 'FileSystem')
STORAGE_BACKENDS = {
'FileSystem': {
'path': _env("TODO_FILE_PATH", '/data/todo.txt')
},
'Dropbox': {
'access_token': _env("DROPBOX_ACCESS_TOKEN", None),
'path': _env("TODO_FILE_PATH", '/todo.txt')
},
'WebDav': {
'path': _env("TODO_FILE_PATH", "remote.php/dav/files/{username}/todo/todo.txt"),
'webdav_hostname': _env("WEBDAV_HOST", "https://my.webdav.com"),
}
}