-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathenv.template
More file actions
226 lines (194 loc) · 8.83 KB
/
env.template
File metadata and controls
226 lines (194 loc) · 8.83 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
# Open Hardware Manager Configuration Template
# Copy this file to .env and customize the values for your environment
# =============================================================================
# Environment Configuration
# =============================================================================
# Environment: "development" or "production"
# In production, encryption credentials and API keys are required
ENVIRONMENT=development
# =============================================================================
# API Configuration
# =============================================================================
DEBUG=false
API_HOST=0.0.0.0
# Standardized default port (matches CLI default)
API_PORT=8001
# CORS Configuration
# Use "*" to allow all origins, or specify comma-separated list of allowed origins
# In production, defaults to empty (no CORS) if not set
CORS_ORIGINS=*
# API Authentication
# Comma-separated list of API keys for authentication (backward compatibility)
# For production, use storage-based keys instead
# In production, a warning is logged if not set
API_KEYS=your-api-key-here,another-api-key
# Authentication Configuration
# Mode: "env" (environment variables only), "storage" (storage only), "hybrid" (both)
AUTH_MODE=hybrid
# Enable storage-based API key management
AUTH_ENABLE_STORAGE=true
# Cache TTL for validated keys in seconds (default: 300 = 5 minutes)
AUTH_CACHE_TTL=300
# Length of generated API keys in bytes (default: 32)
AUTH_KEY_LENGTH=32
# =============================================================================
# Logging Configuration
# =============================================================================
LOG_LEVEL=INFO
LOG_FILE=logs/app.log
# =============================================================================
# Storage Configuration
# =============================================================================
# Storage provider: local, aws_s3, azure_blob, gcp_storage
#
# 🏠 LOCAL STORAGE (Recommended for getting started)
# ------------------------------------------------
# Local storage is the easiest way to get started with OHM. It requires no
# credentials, no cloud accounts, and works out of the box. Perfect for:
# - Getting started and learning OHM
# - Development and testing
# - Self-hosted deployments
# - Network-attached storage (NAS) setups
#
# Simply set STORAGE_PROVIDER=local and specify a path below.
# The system will automatically create the directory structure on first use.
#
STORAGE_PROVIDER=local
# Local storage path - where OHM will store data files
# Supports multiple path formats:
# - Relative paths: ./storage, ./data, storage (relative to project root)
# - Absolute paths: /var/lib/ohm, /opt/ohm-data
# - Home directory: ~/ohm-storage, ~/Documents/ohm-data
# - Environment variables: $HOME/ohm-data, ${HOME}/.ohm/storage
#
# Default: ./storage (creates 'storage' directory in project root)
LOCAL_STORAGE_PATH=./storage
# Note: For local storage, STORAGE_BUCKET_NAME is used internally as a base
# directory name but doesn't affect the actual storage location
STORAGE_BUCKET_NAME=ohm-storage
# ☁️ CLOUD STORAGE (For production deployments)
# ------------------------------------------------
# Cloud storage providers offer benefits for production use:
# - Automatic backups and durability
# - Scalability and availability
# - Team collaboration and sharing
# - Geographic distribution
#
# Configure the appropriate section below if using cloud storage:
# AWS S3 Configuration (if using aws_s3)
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_DEFAULT_REGION=us-east-1 # Region for AWS services
AWS_S3_BUCKET=your-s3-bucket
# Azure Blob Storage Configuration (if using azure_blob)
# Note: Code uses AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_KEY
AZURE_STORAGE_ACCOUNT=your-storage-account # Used in code
AZURE_STORAGE_KEY=your-storage-key # Used in code
AZURE_STORAGE_CONTAINER=your-container # Used in code
# Legacy/alternative names (for backward compatibility)
AZURE_STORAGE_ACCOUNT_NAME=your-storage-account
AZURE_STORAGE_ACCOUNT_KEY=your-storage-key
AZURE_CONTAINER_NAME=your-container
# Azure Storage Service URL (for OKH/OKW libraries)
AZURE_STORAGE_SERVICE_NAME=
# OKH and OKW container names
AZURE_STORAGE_OKH_CONTAINER_NAME=okh
AZURE_STORAGE_OKW_CONTAINER_NAME=okw
# Google Cloud Storage Configuration (if using gcp_storage)
GCP_PROJECT_ID=your-project-id # Used in code
GCP_STORAGE_BUCKET=your-gcs-bucket # Used in code
GCP_CREDENTIALS_JSON=your-service-account-json # Used in code
# Legacy/alternative names (for backward compatibility)
GOOGLE_CLOUD_PROJECT_ID=your-project-id
GOOGLE_CLOUD_STORAGE_BUCKET=your-gcs-bucket
# For authentication, use service account key file or default credentials
# =============================================================================
# LLM Configuration
# =============================================================================
# Enable/disable LLM integration
LLM_ENABLED=false
# LLM Provider: openai, anthropic, google, azure, local
LLM_DEFAULT_PROVIDER=anthropic # Used in code
LLM_PROVIDER=anthropic # Alternative name
LLM_DEFAULT_MODEL=claude-3-sonnet-20240229 # Used in code
LLM_MODEL=claude-3-sonnet-20240229 # Alternative name
# Quality level: hobby, professional, medical
LLM_QUALITY_LEVEL=professional
# Strict mode for validation
LLM_STRICT_MODE=false
# LLM Encryption Credentials (REQUIRED in production)
# These are used to encrypt LLM API keys stored in the system
# In production, these MUST be set to secure values (not defaults)
# In development, defaults are used with a warning
LLM_ENCRYPTION_SALT=
LLM_ENCRYPTION_PASSWORD=
# Alternative: Direct encryption key (if not using salt/password)
LLM_ENCRYPTION_KEY= # Used in code
# Ollama Configuration (for local LLM provider)
OLLAMA_BASE_URL=http://localhost:11434
# OpenAI Configuration (if using openai)
OPENAI_API_KEY=your-openai-api-key
OPENAI_ORGANIZATION_ID=your-org-id # Optional, used in code
# Anthropic Configuration (if using anthropic)
ANTHROPIC_API_KEY=your-anthropic-api-key
# Google AI Configuration (if using google)
GOOGLE_AI_API_KEY=your-google-ai-api-key
# Azure OpenAI Configuration (if using azure)
AZURE_OPENAI_API_KEY=your-azure-openai-api-key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_VERSION=2024-02-15-preview
# =============================================================================
# Cache Configuration
# =============================================================================
# Enable/disable response caching
CACHE_ENABLED=true
# Maximum number of cache entries (LRU eviction)
CACHE_MAX_SIZE=1000
# How often to clean expired entries (seconds)
CACHE_CLEANUP_INTERVAL=60
# =============================================================================
# Rate Limiting Configuration
# =============================================================================
# Enable/disable rate limiting
RATE_LIMIT_ENABLED=true
# How often to clean old request timestamps (seconds)
RATE_LIMIT_CLEANUP_INTERVAL=60
# =============================================================================
# Matching Configuration
# =============================================================================
# Maximum depth for BOM explosion in nested matching (default: 5)
# Controls how deep the system will recurse when matching nested components
# Higher values allow deeper nesting but may impact performance
# Recommended range: 1-5 for optimal performance, max: 10
MAX_DEPTH=5
# =============================================================================
# Domain Configuration
# =============================================================================
# Enable/disable specific domains
COOKING_DOMAIN_ENABLED=true
MANUFACTURING_DOMAIN_ENABLED=true
# =============================================================================
# CLI Configuration
# =============================================================================
# Default server URL for CLI commands
OHM_SERVER_URL=http://localhost:8001
# =============================================================================
# Repository URLs (Optional, for documentation/examples)
# =============================================================================
# Repository URL for OKH library (optional)
OKH_LIBRARY_REPO_URL=
# Repository URL for OKF schema (optional)
OKF_SCHEMA_REPO_URL=
# =============================================================================
# Development/Testing Configuration
# =============================================================================
# Set to true for development mode
DEV_MODE=false
# Test data directory
TEST_DATA_DIR=test-data
# =============================================================================
# Container-specific Configuration
# =============================================================================
# These are typically set by the container runtime
ENV=production
CONTAINER_NAME=open-hardware-manager