forked from ohcnetwork/care
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
510 lines (384 loc) · 15.3 KB
/
.env.example
File metadata and controls
510 lines (384 loc) · 15.3 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
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# ============================================================================
# CARE Backend Environment Variables
# ============================================================================
# This file documents all supported environment variables in the Care backend.
# Copy this file to .env and modify values as needed for your environment.
# ============================================================================
# GENERAL / UTILITIES
# ============================================================================
# Path to the manage.py file (used by scripts)
MANAGE_PY_PATH=manage.py
# Directory for database backups
BACKUP_DIR="./care-backups"
# Number of days to retain database backups
DB_BACKUP_RETENTION_PERIOD=7
# Read environment variables from .env file (boolean: True/False)
# Default: False
# DJANGO_READ_DOT_ENV_FILE=False
# Application version identifier (string)
# Default: "unknown"
# APP_VERSION=unknown
# ============================================================================
# DATABASE CONFIGURATION
# ============================================================================
# PostgreSQL database connection settings
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=db
POSTGRES_DB=care
POSTGRES_PORT=5432
# Full database URL (takes precedence over individual POSTGRES_* variables)
# Format: postgres://username:password@host:port/database
DATABASE_URL=postgres://postgres:postgres@localhost:5433/care
# Maximum age of database connections in seconds (integer)
# Default: 0 (disabled) in base, 60 in deployment
# CONN_MAX_AGE=0
# ============================================================================
# REDIS CONFIGURATION
# ============================================================================
# Redis URL for caching
# Default: redis://localhost:6379
REDIS_URL=redis://localhost:6380
# Celery broker URL (usually Redis) (string, optional)
# Default: Same as REDIS_URL
# CELERY_BROKER_URL=redis://localhost:6380/0
# Timeout for setnx lock operations in seconds (integer)
# Default: 32
# LOCK_TIMEOUT=32
# ============================================================================
# DJANGO CORE SETTINGS
# ============================================================================
# Django secret key for cryptographic signing (string)
# IMPORTANT: Change this in production!
# Default: A default key (DO NOT USE IN PRODUCTION)
# DJANGO_SECRET_KEY=eXZQzOzx8gV38rDG0Z0fFZWweUGl3LwMZ9aTKqJiXQTI0nKMh0Z7sbHfqT8KFEnd
# Enable Django debug mode (boolean: True/False)
# Default: False
DJANGO_DEBUG=False
# Allowed hosts for the application (JSON array)
# Default: ["*"]
# DJANGO_ALLOWED_HOSTS=["*"]
# Django admin URL path (string)
# Default: "admin"
# DJANGO_ADMIN_URL=admin
# CSRF trusted origins (JSON array)
# Default: []
# CSRF_TRUSTED_ORIGINS=[]
# CORS allowed origins (JSON array)
# Default: []
# CORS_ALLOWED_ORIGINS=[]
# CORS allowed origin regexes (JSON array)
# Default: []
# CORS_ALLOWED_ORIGIN_REGEXES=[]
# ============================================================================
# SECURITY SETTINGS
# ============================================================================
# Enable secure SSL redirect (boolean: True/False)
# Default: True in deployment
# DJANGO_SECURE_SSL_REDIRECT=True
# Include subdomains in HSTS policy (boolean: True/False)
# Default: True in deployment
# DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS=True
# Enable HSTS preload (boolean: True/False)
# Default: True in deployment
# DJANGO_SECURE_HSTS_PRELOAD=True
# Enable content type nosniff header (boolean: True/False)
# Default: True in deployment
# DJANGO_SECURE_CONTENT_TYPE_NOSNIFF=True
# ============================================================================
# EMAIL CONFIGURATION
# ============================================================================
# Email backend to use (string)
# Default: django.core.mail.backends.smtp.EmailBackend
# DJANGO_EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
# Default "from" email address (string)
# Default: "Open Healthcare Network <ops@care.ohc.network>"
# EMAIL_FROM="Open Healthcare Network <ops@care.ohc.network>"
# Email server hostname (string)
# Default: localhost
# EMAIL_HOST=localhost
# Email server port (integer)
# Default: 587
# EMAIL_PORT=587
# Email server username (string)
# Default: ""
# EMAIL_USER=
# Email server password (string)
# Default: ""
# EMAIL_PASSWORD=
# Use TLS for email (boolean: True/False)
# Default: False (True in deployment)
# EMAIL_USE_TLS=False
# Email subject prefix (string)
# Default: "[Care]"
# DJANGO_EMAIL_SUBJECT_PREFIX=[Care]
# ============================================================================
# S3 / OBJECT STORAGE CONFIGURATION
# ============================================================================
# Cloud storage provider (string: AWS, GCP, AZURE, etc.)
# Default: "aws"
# BUCKET_PROVIDER=aws
# Primary bucket configuration
BUCKET_REGION=ap-south-1
BUCKET_KEY=key
BUCKET_SECRET=secret
BUCKET_ENDPOINT=http://localhost:4566
BUCKET_EXTERNAL_ENDPOINT=http://localhost:4566
# Enable fine-grained ACL control on buckets (boolean: True/False)
# Default: False
# BUCKET_HAS_FINE_ACL=False
# File upload bucket configuration
FILE_UPLOAD_BUCKET=patient-bucket
# File upload bucket region (string)
# Default: Same as BUCKET_REGION
# FILE_UPLOAD_REGION=ap-south-1
# File upload bucket access key (string)
# Default: Same as BUCKET_KEY
# FILE_UPLOAD_KEY=key
# File upload bucket secret key (string)
# Default: Same as BUCKET_SECRET
# FILE_UPLOAD_SECRET=secret
# File upload bucket endpoint (string)
# Default: Same as BUCKET_ENDPOINT
# FILE_UPLOAD_BUCKET_ENDPOINT=http://localhost:4566
# File upload bucket external endpoint (string)
# Default: BUCKET_EXTERNAL_ENDPOINT if BUCKET_ENDPOINT is set, else FILE_UPLOAD_BUCKET_ENDPOINT
# FILE_UPLOAD_BUCKET_EXTERNAL_ENDPOINT=http://localhost:4566
# Facility bucket configuration
FACILITY_S3_BUCKET=facility-bucket
# Facility S3 region (string)
# Default: Same as BUCKET_REGION
# FACILITY_S3_REGION_CODE=ap-south-1
# Facility S3 access key (string)
# Default: Same as BUCKET_KEY
# FACILITY_S3_KEY=key
# Facility S3 secret key (string)
# Default: Same as BUCKET_SECRET
# FACILITY_S3_SECRET=secret
# Facility S3 bucket endpoint (string)
# Default: Same as BUCKET_ENDPOINT
# FACILITY_S3_BUCKET_ENDPOINT=http://localhost:4566
# Facility S3 bucket external endpoint (string)
# Default: BUCKET_EXTERNAL_ENDPOINT if BUCKET_ENDPOINT is set, else FACILITY_S3_BUCKET_ENDPOINT
# FACILITY_S3_BUCKET_EXTERNAL_ENDPOINT=http://localhost:4566
# Facility CDN URL (string, optional)
# Default: None
# FACILITY_CDN=
# ============================================================================
# FILE UPLOAD SETTINGS
# ============================================================================
# Maximum file upload size in MB (integer)
# Default: 5
# MAX_FILE_UPLOAD_SIZE=5
# Allowed MIME types for file uploads (comma-separated list)
# Default: Comprehensive list of image, video, audio, and document types
# ALLOWED_MIME_TYPES=image/jpeg,image/png,image/gif,video/mp4,audio/mpeg,application/pdf,...
# Allowed file extensions for uploads (comma-separated list)
# Default: Comprehensive list of safe extensions
# ALLOWED_FILE_EXTENSIONS=jpg,jpeg,png,gif,mp4,mp3,pdf,doc,xls,...
# Blocked file extensions (comma-separated list)
# Default: exe,dll,bat,cmd,sh,sys,reg,...
# BLOCKED_FILE_EXTENSIONS=exe,dll,bat,cmd,sh,...
# Expiry time for incomplete file uploads in hours (integer)
# Default: 24 (set to 0 to disable cleanup)
# FILE_UPLOAD_EXPIRY_HOURS=24
# ============================================================================
# JWT AUTHENTICATION
# ============================================================================
# JWT access token lifetime in minutes (integer)
# Default: 10
# JWT_ACCESS_TOKEN_LIFETIME=10
# JWT refresh token lifetime in minutes (integer)
# Default: 30
# JWT_REFRESH_TOKEN_LIFETIME=30
# JWKS (JSON Web Key Set) base64-encoded (string)
# Used for OpenID Connect authentication
# Default: Generated from file
# JWKS_BASE64=
# ============================================================================
# SENTRY (ERROR TRACKING)
# ============================================================================
# Sentry DSN for error tracking (string)
# Default: "" (disabled)
# SENTRY_DSN=
# Sentry environment name (string)
# Default: "deployment-unknown"
# SENTRY_ENVIRONMENT=production
# Sentry traces sample rate (float: 0.0 to 1.0)
# Default: 0
# SENTRY_TRACES_SAMPLE_RATE=0
# Sentry profiles sample rate (float: 0.0 to 1.0)
# Default: 0
# SENTRY_PROFILES_SAMPLE_RATE=0
# Sentry event logging level (integer)
# Default: logging.ERROR (40)
# SENTRY_EVENT_LEVEL=40
# ============================================================================
# SMS / SNS CONFIGURATION
# ============================================================================
# Enable SMS functionality (boolean: True/False)
# Default: False (True in staging/production)
# USE_SMS=False
# AWS SNS access key for SMS (string)
# Default: ""
# SNS_ACCESS_KEY=
# AWS SNS secret key for SMS (string)
# Default: ""
# SNS_SECRET_KEY=
# AWS SNS region (string)
# Default: "ap-south-1"
# SNS_REGION=ap-south-1
# Use SNS role-based authentication (boolean: True/False)
# Default: False
# SNS_ROLE_BASED_MODE=False
# OTP SMS template path (string)
# Default: "sms/otp_sms.txt"
# OTP_SMS_TEMPLATE=sms/otp_sms.txt
# ============================================================================
# EMAIL TEMPLATES
# ============================================================================
# User create password email template path (string)
# Default: "email/user_create_password.html"
# USER_CREATE_PASSWORD_TEMPLATE_PATH=email/user_create_password.html
# User reset password email template path (string)
# Default: "email/user_reset_password.html"
# USER_RESET_PASSWORD_TEMPLATE_PATH=email/user_reset_password.html
# TOTP enabled email template path (string)
# Default: "email/totp_enabled.html"
# TOTP_ENABLED_EMAIL_TEMPLATE_PATH=email/totp_enabled.html
# TOTP disabled email template path (string)
# Default: "email/totp_disabled.html"
# TOTP_DISABLED_EMAIL_TEMPLATE_PATH=email/totp_disabled.html
# ============================================================================
# RATE LIMITING & CAPTCHA
# ============================================================================
# Disable rate limiting (boolean: True/False)
# Default: False
# DISABLE_RATELIMIT=False
# Rate limit specification (string, format: count/period)
# Example: "5/10m" means 5 requests per 10 minutes
# Default: "5/10m"
# RATE_LIMIT=5/10m
# Google reCAPTCHA secret key (string)
# Default: ""
# GOOGLE_RECAPTCHA_SECRET_KEY=
# Google reCAPTCHA site key (string)
# Default: ""
# GOOGLE_RECAPTCHA_SITE_KEY=
# ============================================================================
# AUDIT LOGS
# ============================================================================
# Enable audit logging (boolean: True/False)
# Default: False
# AUDIT_LOG_ENABLED=False
# ============================================================================
# MAINTENANCE MODE
# ============================================================================
# Enable maintenance mode (integer: 0 or 1)
# Default: 0 (disabled)
# MAINTENANCE_MODE=0
# ============================================================================
# DOMAIN CONFIGURATION
# ============================================================================
# Current frontend domain (string)
# Default: "localhost:4000"
# CURRENT_DOMAIN=localhost:4000
# Backend API domain (string)
# Default: "localhost:9000"
# BACKEND_DOMAIN=localhost:9000
# ============================================================================
# MIDDLEWARE & PERFORMANCE
# ============================================================================
# Enable request time logging middleware (boolean: True/False)
# Default: False
# ENABLE_REQUEST_TIME_LOGGING=False
# Middleware request timeout in seconds (integer)
# Default: 20
# MIDDLEWARE_REQUEST_TIMEOUT=20
# ============================================================================
# EXTERNAL SERVICES
# ============================================================================
# Snowstorm FHIR server URL for SNOMED CT (string)
# Default: "http://165.22.211.144/fhir"
# SNOWSTORM_DEPLOYMENT_URL=http://165.22.211.144/fhir
# ============================================================================
# BUSINESS LOGIC / EMR CONFIGURATION
# ============================================================================
# Maximum data points per upsert operation (integer)
# Default: 100
# MAX_DATAPOINTS_PER_UPSERT=100
# Maximum requests per batch request (integer)
# Default: 20
# MAX_REQUESTS_PER_BATCH_REQUEST=20
# Maximum appointments per patient (integer)
# Default: 10
# MAX_APPOINTMENTS_PER_PATIENT=10
# Maximum active encounters per patient in a facility (integer)
# Default: 5
# MAX_ACTIVE_ENCOUNTERS_PER_PATIENT_IN_FACILITY=5
# Password reset token TTL in hours (integer)
# Default: 24
# PASSWORD_RESET_TOKEN_TTL_HOURS=24
# Maximum favorites per list (integer)
# Default: 50
# MAX_FAVORITES_PER_LIST=50
# Maximum location hierarchy depth (integer)
# Default: 10
# LOCATION_MAX_DEPTH=10
# Maximum organization hierarchy depth (integer)
# Default: 10
# ORGANIZATION_MAX_DEPTH=10
# Maximum facility organization hierarchy depth (integer)
# Default: 10
# FACILITY_ORGANIZATION_MAX_DEPTH=10
# Maximum locations in a facility (integer)
# Default: 1000
# MAX_LOCATION_IN_FACILITY=1000
# Maximum organizations in a facility (integer)
# Default: 1000
# MAX_ORGANIZATION_IN_FACILITY=1000
# Maximum slots per availability (integer)
# Default: 30
# MAX_SLOTS_PER_AVAILABILITY=30
# Maximum questionnaire text response size (integer)
# Default: 2500
# MAX_QUESTIONNAIRE_TEXT_RESPONSE_SIZE=2500
# Tax codes configuration (JSON array)
# Default: Predefined Indian tax codes (IGST, CGST, SGST, UTGST)
# TAX_CODES=[]
# Tax monetary component definitions (JSON array)
# Default: Predefined tax slabs (18%, 12%, 5%)
# TAX_MONETARY_COMPONENT_DEFINITIONS=[]
# Discount codes configuration (JSON array)
# Default: Predefined discount codes (oldage, child, student)
# DISCOUNT_CODES=[]
# Discount monetary component definitions (JSON array)
# Default: Predefined discount definitions
# DISCOUNT_MONETARY_COMPONENT_DEFINITIONS=[]
# Informational monetary codes (JSON array)
# Default: [{"code": "mrp", "display": "MRP", ...}]
# INFORMATIONAL_MONETARY_CODES=[]
# Maintain patient name identifier (boolean: True/False)
# Default: False
# MAINTAIN_PATIENT_NAME_IDENTIFIER=False
# Maintain patient phone number identifier (boolean: True/False)
# Default: False
# MAINTAIN_PATIENT_PHONE_NUMBER_IDENTIFIER=False
# Maintain facility patient name identifier (boolean: True/False)
# Default: True
# MAINTAIN_FACILITY_PATIENT_NAME_IDENTIFIER=True
# Patient name maximum length (integer)
# Default: 75
# PATIENT_NAME_MAX_LENGTH=75
# Encounter restart time limit in hours (integer)
# Default: 0 (disabled)
# ENCOUNTER_RESTART_TIME_LIMIT_HOURS=0
# ============================================================================
# DEVELOPMENT / DEBUGGING
# ============================================================================
# Enable Django Silk profiler for development (boolean: True/False)
# Default: False
# ENABLE_SILK=False
# Attach debugger for development (boolean: True/False)
# Default: False
# ATTACH_DEBUGGER=False