-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
144 lines (122 loc) · 4.62 KB
/
.env.example
File metadata and controls
144 lines (122 loc) · 4.62 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
# ==============================================
# HumanDNAVisualizer - Environment Configuration
# ==============================================
# Copy this file to .env and update with your values
# DO NOT commit .env to version control!
# ==============================================
# SPRING PROFILE CONFIGURATION
# ==============================================
# Options: dev (H2 in-memory, demo mode enabled), prod (PostgreSQL, demo mode disabled)
SPRING_PROFILES_ACTIVE=dev
# ==============================================
# DATABASE CONFIGURATION
# ==============================================
# PostgreSQL (Production mode)
DB_USERNAME=dna_user
DB_PASSWORD=dna_password
POSTGRES_DB=dna_db
# Database connection string (production)
# SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/dna_db
# ==============================================
# BACKEND API CONFIGURATION
# ==============================================
# Backend server port
SERVER_PORT=8081
# JWT Configuration
# IMPORTANT: Generate a secure random key for production (min 256 bits)
# You can generate one with: openssl rand -base64 64
JWT_SECRET=MySecretKeyForJWT-ChangeThisInProduction-MustBe256BitsOrMore-DevelopmentOnly
JWT_EXPIRATION=86400000
# ==============================================
# DEMO MODE CONFIGURATION
# ==============================================
# Demo mode settings (auto-configured by profile, but can override)
# Set to false in production!
APP_DEMO_MODE_ENABLED=true
APP_DEMO_MODE_AUTO_CREATE_DEMO_USERS=true
APP_DEMO_MODE_EXPOSE_DEMO_CREDENTIALS=true
APP_DEMO_MODE_RELAXED_PASSWORD_POLICY=true
# ==============================================
# FRONTEND API URLS
# ==============================================
# Backend API URL
VITE_API_URL=http://localhost:8081/api
# AI Model Service URL
VITE_AI_URL=http://localhost:8000
# LLM Service URL
VITE_LLM_URL=http://localhost:8002
# ==============================================
# SECURITY & CORS
# ==============================================
# Allowed origins for CORS (comma-separated)
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:3005,http://localhost:3006
# Maximum failed login attempts before lockout
SECURITY_MAX_FAILED_ATTEMPTS=5
# Lockout duration in minutes
SECURITY_LOCKOUT_DURATION=30
# ==============================================
# FILE UPLOAD LIMITS
# ==============================================
# Maximum file sizes
UPLOAD_MAX_VCF_SIZE=50MB
UPLOAD_MAX_FHIR_SIZE=10MB
UPLOAD_MAX_CSV_SIZE=5MB
# Spring Boot multipart settings
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE=100MB
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE=100MB
# ==============================================
# ENCRYPTION (Optional)
# ==============================================
# AES-256-GCM encryption key for sensitive genomic data
# Leave empty to auto-generate in dev mode
# MUST set in production with a secure random key
SECURITY_ENCRYPTION_KEY=
# ==============================================
# EXTERNAL API KEYS (Optional)
# ==============================================
# xAI (Grok) API Key for LLM features
XAI_API_KEY=your_xai_api_key_here
# HuggingFace API Key for AI models
HUGGINGFACE_API_KEY=your_hf_api_key_here
# ==============================================
# LOGGING CONFIGURATION
# ==============================================
# Logging levels: TRACE, DEBUG, INFO, WARN, ERROR
LOGGING_LEVEL_ROOT=INFO
LOGGING_LEVEL_COM_DNA_INTEGRATOR=DEBUG
LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_SECURITY=DEBUG
# ==============================================
# ACTUATOR / MONITORING
# ==============================================
# Endpoints to expose (comma-separated)
MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE=health,info,metrics,prometheus
# Enable Prometheus metrics
MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true
# ==============================================
# DOCKER-SPECIFIC (Optional)
# ==============================================
# Used by docker-compose.yml
POSTGRES_USER=dna_user
POSTGRES_PASSWORD=dna_password
REDIS_PASSWORD=
# ==============================================
# DEVELOPMENT NOTES
# ==============================================
# Dev Mode (H2 In-Memory Database):
# - Demo mode: ENABLED
# - Auto-creates demo users: demo/demo123, admin/admin123, moderator/mod123
# - H2 Console: http://localhost:8081/h2-console
# - JDBC URL: jdbc:h2:mem:dna_db
# - Username: sa, Password: (empty)
#
# Production Mode (PostgreSQL):
# - Demo mode: DISABLED
# - Requires PostgreSQL running
# - Strong password validation enforced
# - Email verification required
#
# Quick Start:
# 1. cp .env.example .env
# 2. cd backend/dna-integrator
# 3. ./run-dev.bat (or ./run-dev.sh)
# 4. Visit http://localhost:8081/swagger-ui.html