-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
198 lines (166 loc) · 6.52 KB
/
Copy pathenv.example
File metadata and controls
198 lines (166 loc) · 6.52 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
# =============================================================================
# AutoDoc Environment Configuration Template
# =============================================================================
# Copy this file to .env and update with your actual values
# Never commit .env files to version control
#
# Usage:
# cp env.example .env
# # Edit .env with your actual values
#
# For one-command setup:
# make setup
# =============================================================================
# Environment
# =============================================================================
ENVIRONMENT=development
DEBUG=true
LOG_LEVEL=DEBUG
CI=false
# =============================================================================
# Database Configuration
# =============================================================================
# SQLite (default for development)
DATABASE_URL=sqlite:///./autodoc.db
# PostgreSQL (for production)
# DATABASE_URL=postgresql://user:password@localhost:5432/autodoc
# Database connection pool settings
DB_POOL_SIZE=5
DB_MAX_OVERFLOW=10
DB_POOL_TIMEOUT=30
DB_POOL_RECYCLE=3600
# =============================================================================
# Redis Configuration (Optional)
# =============================================================================
# Redis for caching and session storage
REDIS_URL=redis://localhost:6379/0
# =============================================================================
# API Configuration
# =============================================================================
API_HOST=0.0.0.0
API_PORT=8000
API_WORKERS=1
API_RELOAD=true
# CORS settings (JSON format)
CORS_ORIGINS=["http://localhost:3000", "http://localhost:8080"]
CORS_ALLOW_CREDENTIALS=true
CORS_ALLOW_METHODS=["GET", "POST", "PUT", "DELETE", "OPTIONS"]
CORS_ALLOW_HEADERS=["*"]
# =============================================================================
# Security (REQUIRED - MUST be provided via environment)
# =============================================================================
# Generate strong secrets for production:
# python -c "import secrets; print(secrets.token_urlsafe(32))"
SECRET_KEY=dev-secret-key-change-in-production-must-be-32-chars-minimum
JWT_SECRET_KEY=dev-jwt-secret-key-must-be-32-chars-minimum
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
# =============================================================================
# External Services (Optional - read from environment only)
# =============================================================================
# Confluence Integration
CONFLUENCE_URL=https://your-domain.atlassian.net
CONFLUENCE_USERNAME=your-username
CONFLUENCE_TOKEN=your-api-token
CONFLUENCE_SPACE_KEY=YOUR_SPACE
CONFLUENCE_PAGE_PREFIX=AutoDoc
CONFLUENCE_TIMEOUT=30
CONFLUENCE_MAX_RETRIES=3
# Git/SCM Integration (Optional)
GIT_TOKEN=your-git-token
GIT_PROVIDER=github # github, gitlab, bitbucket
# =============================================================================
# File Storage
# =============================================================================
UPLOAD_DIR=./uploads
TEMP_DIR=./temp
ALLOWED_UPLOAD_EXTENSIONS=py,js,ts,java,go,rb,php,cs,cpp,c,h,hpp,html,css,json,xml,md,txt
MAX_UPLOAD_SIZE_MB=10
# =============================================================================
# Logging Configuration
# =============================================================================
LOG_FORMAT=json # json or text
LOG_FILE=./logs/autodoc.log
LOG_INCLUDE_CORRELATION=true
# =============================================================================
# Development Settings
# =============================================================================
# Hot reload for development
HOT_RELOAD=true
# Enable debug toolbar
DEBUG_TOOLBAR=false
# Mock external services for testing
MOCK_CONFLUENCE=false
MOCK_GIT=false
# =============================================================================
# Testing Configuration
# =============================================================================
# Test database (separate from main)
TEST_DATABASE_URL=sqlite:///./test_autodoc.db
# Test-specific settings
TEST_LOG_LEVEL=WARNING
TEST_DISABLE_EXTERNAL_CALLS=true
# =============================================================================
# Performance Settings
# =============================================================================
# Maximum number of files to analyze in a single run
MAX_ANALYSIS_FILES=1000
# Maximum file size for analysis (in bytes)
MAX_FILE_SIZE_BYTES=1048576 # 1MB
# Analysis timeout (in seconds)
ANALYSIS_TIMEOUT=300
# =============================================================================
# Notification Settings (Optional)
# =============================================================================
# Email notifications
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_FROM=your-email@gmail.com
# Slack notifications
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
# =============================================================================
# Monitoring and Observability (Optional)
# =============================================================================
# Prometheus metrics
ENABLE_METRICS=true
METRICS_PORT=9090
# Health check settings
HEALTH_CHECK_INTERVAL=30
HEALTH_CHECK_TIMEOUT=10
# =============================================================================
# Docker Development
# =============================================================================
# Docker-specific settings
DOCKER_BUILD_CONTEXT=.
DOCKER_TAG=autodoc:dev
# =============================================================================
# CI/CD Integration
# =============================================================================
# CI environment detection
CI_COMMIT_SHA=
CI_REPOSITORY=
CI_BRANCH=
CI_PULL_REQUEST=
# =============================================================================
# Advanced Configuration
# =============================================================================
# Worker processes for analysis
ANALYSIS_WORKERS=4
# Cache settings
CACHE_TTL=3600 # 1 hour
CACHE_MAX_SIZE=1000
# Rate limiting
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60 # seconds
# =============================================================================
# Feature Flags
# =============================================================================
# Enable/disable features
ENABLE_ANALYSIS=true
ENABLE_CONFLUENCE_UPDATES=true
ENABLE_GIT_INTEGRATION=true
ENABLE_NOTIFICATIONS=false
ENABLE_METRICS=false