forked from dimagi/commcare-hq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocalsettings.example.py
302 lines (245 loc) · 10.6 KB
/
localsettings.example.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
import os
####### Database config. This assumes Postgres #######
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'commcarehq',
'USER': 'postgres',
'PASSWORD': '******',
'HOST': 'localhost',
'PORT': '5432'
}
}
### Reporting database
SQL_REPORTING_DATABASE_URL = "postgresql://username:****@localhost:5432/commcarehq_reporting"
####### Couch Config ######
COUCH_HTTPS = False # recommended production value is True if enabling https
COUCH_SERVER_ROOT = '127.0.0.1:5984' #6984 for https couch
COUCH_USERNAME = 'admin'
COUCH_PASSWORD = '********'
COUCH_DATABASE_NAME = 'commcarehq'
### Staging Replication Setup for Production/Staging
#Staging domains you want to replicate
STAGING_DOMAINS = []
#COUCHDB URI {http|https}://username:password@host:optionalport/dbname
PRODUCTION_COUCHDB_URI = ""
####### # Email setup ########
# email settings: these ones are the custom hq ones
EMAIL_LOGIN = "notifications@dimagi.com"
EMAIL_PASSWORD = "******"
EMAIL_SMTP_HOST = "smtp.gmail.com"
EMAIL_SMTP_PORT = 587
# Print emails to console so there is no danger of spamming, but you can still get registration URLs
EMAIL_BACKEND='django.core.mail.backends.console.EmailBackend'
ADMINS = (('HQ Dev Team', 'commcarehq-dev+www-notifications@dimagi.com'),)
BUG_REPORT_RECIPIENTS = ['commcarehq-support@dimagi.com']
NEW_DOMAIN_RECIPIENTS = ['commcarehq-dev+newdomain@dimagi.com']
EXCHANGE_NOTIFICATION_RECIPIENTS = ['commcarehq-dev+exchange@dimagi.com']
SERVER_EMAIL = 'commcarehq-noreply@dimagi.com' #the physical server emailing - differentiate if needed
DEFAULT_FROM_EMAIL = 'commcarehq-noreply@dimagi.com'
SUPPORT_EMAIL = "commcarehq-support@dimagi.com"
EMAIL_SUBJECT_PREFIX = '[commcarehq] '
SERVER_ENVIRONMENT = 'changeme' #identify the target type of this running environment
####### Log/debug setup ########
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# log directories must exist and be writeable!
DJANGO_LOG_FILE = "/tmp/commcare-hq.django.log"
LOG_FILE = "/tmp/commcare-hq.log"
SEND_BROKEN_LINK_EMAILS = True
CELERY_SEND_TASK_ERROR_EMAILS = True
CELERY_PERIODIC_QUEUE = 'celery' # change this to something else if you want a different queue for periodic tasks
CELERY_FLOWER_URL = 'http://127.0.0.1:5555'
####### Bitly ########
BITLY_LOGIN = 'dimagi'
BITLY_APIKEY = '*******'
####### Jar signing config ########
_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
JAR_SIGN = dict(
jad_tool = os.path.join(_ROOT_DIR, "corehq", "apps", "app_manager", "JadTool.jar"),
key_store = os.path.join(os.path.dirname(os.path.dirname(_ROOT_DIR)), "DimagiKeyStore"),
key_alias = "javarosakey",
store_pass = "*******",
key_pass = "*******",
)
####### SMS Config ########
# Mach
SMS_GATEWAY_URL = "http://gw1.promessaging.com/sms.php"
SMS_GATEWAY_PARAMS = "id=******&pw=******&dnr=%(phone_number)s&msg=%(message)s&snr=DIMAGI"
# Unicel
UNICEL_CONFIG = {"username": "Dimagi",
"password": "******",
"sender": "Promo" }
####### Domain sync / de-id ########
DOMAIN_SYNCS = {
"domain_name": {
"target": "target_db_name",
"transform": "corehq.apps.domainsync.transforms.deidentify_domain"
}
}
DOMAIN_SYNC_APP_NAME_MAP = { "app_name": "new_app_name" }
####### Touchforms config - for CloudCare #######
XFORMS_PLAYER_URL = 'http://127.0.0.1:4444'
# email and password for an admin django user, such as one created with
# ./manage.py bootstrap <project-name> <email> <password>
TOUCHFORMS_API_USER = 'admin@example.com'
TOUCHFORMS_API_PASSWORD = 'password'
####### Misc / HQ-specific Config ########
DEFAULT_PROTOCOL = "http" # or https
OVERRIDE_LOCATION="https://www.commcarehq.org"
#Set your analytics IDs here for GA and pingdom RUM
ANALYTICS_IDS = {
'GOOGLE_ANALYTICS_ID': '*******',
'PINGDOM_ID': '*****'
}
AXES_LOCK_OUT_AT_FAILURE = False
LUCENE_ENABLED = True
PREVIEWER_RE = r'^.*@dimagi\.com$'
GMAPS_API_KEY = '******'
MAPS_LAYERS = {
'Maps': {
'family': 'mapbox',
'args': {
'apikey': '*****'
}
},
'Satellite': {
'family': 'mapbox',
'args': {
'apikey': '*****'
}
},
}
FORMTRANSLATE_TIMEOUT = 5
LOCAL_APPS = (
# 'django_coverage', # Adds `python manage.py test_coverage` (settings below)
# 'debug_toolbar', # Adds a retractable panel to every page giving profiling & debugging info
# 'couchdebugpanel', # Adds couch info to said toolbar
# 'devserver', # Adds improved dev server that also prints SQL on the console (for AJAX, etc, when you cannot use debug_toolbar)
# 'django_cpserver', # Another choice for a replacement server
# 'dimagi.utils'
)
# list of domains to enable ADM reporting on
ADM_ENABLED_PROJECTS = []
# prod settings
SOIL_DEFAULT_CACHE = "redis"
SOIL_BACKEND = "soil.CachedDownload"
# reports cache
REPORT_CACHE = 'default' # or e.g. 'redis'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': 'localhost:11211',
},
'redis': {
'BACKEND': 'redis_cache.cache.RedisCache',
'LOCATION': 'localhost:6379:0',
'OPTIONS': {},
},
}
ELASTICSEARCH_HOST = 'localhost' #on both a local and a distributed environment this should be
# localhost
ELASTICSEARCH_PORT = 9200
# our production logstash aggregation
LOGSTASH_DEVICELOG_PORT = 10777
LOGSTASH_COUCHLOG_PORT = 10888
LOGSTASH_AUDITCARE_PORT = 10999
LOGSTASH_HOST = 'localhost'
LOCAL_PILLOWTOPS = {
'my_pillows': ['some.pillow.Class', ],
'and_more': []
}
#If there are existing doc_ids and case_ids you want to check directly - they are referenced
#in your localsettings for more accurate direct checks, otherwise use view based which can be inaccurate.
ES_CASE_CHECK_DIRECT_DOC_ID = None
ES_XFORM_CHECK_DIRECT_DOC_ID = None
####### API throttling #####
CCHQ_API_THROTTLE_REQUESTS = 20 # number of requests allowed per timeframe
CCHQ_API_THROTTLE_TIMEFRAME = 10 # seconds
####### django-coverage config ########
COVERAGE_REPORT_HTML_OUTPUT_DIR='coverage-html'
COVERAGE_MODULE_EXCLUDES= ['tests$', 'settings$', 'urls$', 'locale$',
'common.views.test', '^django', 'management', 'migrations',
'^south', '^djcelery', '^debug_toolbar', '^rosetta']
####### Selenium tests config ########
SELENIUM_SETUP = {
# Firefox, Chrome, Ie, or Remote
'BROWSER': 'Chrome',
# Necessary if using Remote selenium driver
'REMOTE_URL': None,
# If not using Remote, allows you to open browsers in a hidden virtual X Server
'USE_XVFB': True,
'XVFB_DISPLAY_SIZE': (1024, 768),
}
SELENIUM_USERS = {
# 'WEB_USER' is optional; if not set, some tests that want a web user will
# try to use ADMIN instead
'ADMIN': {
'USERNAME': 'foo@example.com',
'PASSWORD': 'password',
'URL': 'http://localhost:8000',
'PROJECT': 'project_name',
'IS_SUPERUSER': False
},
'WEB_USER': {
'USERNAME': 'foo@example.com',
'PASSWORD': 'password',
'URL': 'http://localhost:8000',
'PROJECT': 'mike',
'IS_SUPERUSER': False
},
'MOBILE_WORKER': {
'USERNAME': 'user@project_name.commcarehq.org',
'PASSWORD': 'password',
'URL': 'http://localhost:8000'
}
}
SELENIUM_APP_SETTINGS = {
'reports': {
'MAX_PRELOAD_TIME': 20,
'MAX_LOAD_TIME': 30,
},
}
INTERNAL_DATA = {
"business_unit": [],
"product": ["CommCare", "CommConnect", "CommTrack", "RapidSMS", "Custom"],
"services": [],
"account_types": [],
"initiatives": [],
"contract_type": [],
"area": [
{
"name": "Health",
"sub_areas": ["Maternal, Newborn, & Child Health", "Family Planning", "HIV/AIDS"]
},
{
"name": "Other",
"sub_areas": ["Emergency Response"]
},
],
"country": ["Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua & Deps", "Argentina", "Armenia",
"Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus",
"Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia Herzegovina", "Botswana", "Brazil",
"Brunei", "Bulgaria", "Burkina", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde",
"Central African Rep", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo",
"Congo {Democratic Rep}", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark",
"Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador",
"Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia",
"Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana",
"Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland {Republic}",
"Israel", "Italy", "Ivory Coast", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati",
"Korea North", "Korea South", "Kosovo", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho",
"Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi",
"Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico",
"Micronesia", "Moldova", "Monaco", "Mongolia", "Montenegro", "Morocco", "Mozambique", "Myanmar, {Burma}",
"Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway",
"Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland",
"Portugal", "Qatar", "Romania", "Russian Federation", "Rwanda", "St Kitts & Nevis", "St Lucia",
"Saint Vincent & the Grenadines", "Samoa", "San Marino", "Sao Tome & Principe", "Saudi Arabia",
"Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia",
"Solomon Islands", "Somalia", "South Africa", "South Sudan", "Spain", "Sri Lanka", "Sudan", "Suriname",
"Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo",
"Tonga", "Trinidad & Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine",
"United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu",
"Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe"]
}