-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
41 lines (31 loc) · 1.38 KB
/
config.py
File metadata and controls
41 lines (31 loc) · 1.38 KB
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
38
39
40
41
import os
## Set as true to run in debug mode
DEBUG = os.environ.get('DEBUG', 'False').lower() == 'true'
## AWS Credentials
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')
AWS_OWNER_ID = os.environ.get('AWS_OWNER_ID')
## Google OAuth Credentials
GOOGLE_ID = os.environ.get('GOOGLE_ID', None)
GOOGLE_SECRET = os.environ.get('GOOGLE_SECRET', None)
AUTHORIZED_EMAILS = os.environ.get('AUTHORIZED_EMAILS', '*')
LOGIN_ENABLED = (GOOGLE_ID is not None) and (GOOGLE_SECRET is not None)
## Redis settings
REDIS_HOST = os.environ.get('REDIS_HOST', '127.0.0.1')
REDIS_PORT_NO = int(os.environ.get('REDIS_PORT_NO', 6379))
REDIS_PASSWORD = os.environ.get('REDIS_PASSWORD', '')
REDIS_IDLE_TIMEOUT = int(os.environ.get('REDIS_IDLE_TIMEOUT', 60))
## Application host and port
HOST = os.environ.get('HOST', '0.0.0.0')
PORT = int(os.environ.get('PORT', 5000))
## AWS Sync and auto refresh timeouts
SYNC_TIMEOUT = int(os.environ.get('SYNC_TIMEOUT', 300))
AUTO_REFRESH_TIMEOUT = int(os.environ.get('AUTO_REFRESH_TIMEOUT', 3600))
## EC2 region to be synced (comma separated values)
REGIONS = os.environ.get('REGIONS', 'all')
## Duration for which data is cached
EXPIRE_DURATION = 2592000 # 30 Days
## Sentry for catching exceptions
SENTRY_DSN = os.environ.get('SENTRY_DSN', None)
## Secret key for cookies
SECRET_KEY = os.urandom(128)