-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
208 lines (166 loc) · 8.84 KB
/
.env.example
File metadata and controls
208 lines (166 loc) · 8.84 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
# =============================================================================
# TemplateTestBot - Environment Configuration
# =============================================================================
# Copy this file to .env and fill in your actual values
# The .env file should NEVER be committed to version control
#
# To get started:
# 1. Copy this file: cp .env.example .env
# 2. Fill in your GitHub App credentials below
# 3. Run: dotnet run
# =============================================================================
# GitHub App Configuration (REQUIRED)
# =============================================================================
# Your GitHub App ID (get this from https://github.com/settings/apps)
PROBOTSHARP_GITHUB_APPID=123456
# Your GitHub App's webhook secret
# This is used to verify that webhook payloads are from GitHub
PROBOTSHARP_WEBHOOK_SECRET=your-webhook-secret-here
# GitHub App Private Key
# Option 1: Path to private key file (recommended for local development)
PROBOTSHARP_GITHUB_PRIVATEKEY=./private-key.pem
# Option 2: Base64 encoded private key (recommended for production/containers)
# Uncomment and use this instead of the file path if you prefer
# PROBOTSHARP_GITHUB_PRIVATEKEY=LS0tLS1CRUdJTi...
# Optional: GitHub API base URL (only needed for GitHub Enterprise)
# PROBOTSHARP_GITHUB_BASEURL=https://api.github.com
# =============================================================================
# Application Configuration
# =============================================================================
# ASP.NET Core environment (Development, Staging, Production)
ASPNETCORE_ENVIRONMENT=Development
# Port the application listens on
ASPNETCORE_URLS=http://localhost:5000
# =============================================================================
# Logging Configuration
# =============================================================================
# Default log level (Trace, Debug, Information, Warning, Error, Critical)
LOG_LEVEL_DEFAULT=Information
# Log level for ASP.NET Core framework
LOG_LEVEL_ASPNETCORE=Warning
# Log level for Entity Framework (if using database)
LOG_LEVEL_EF=Warning
# Log level for ProbotSharp components
LOG_LEVEL_PROBOTSHARP=Debug
# =============================================================================
# Database Configuration (Optional - only if you need persistence)
# =============================================================================
# PostgreSQL connection string
# ConnectionStrings__ProbotSharp=Host=localhost;Port=5432;Database=templatetestbot;Username=postgres;Password=yourpassword
# =============================================================================
# Adapter Configuration (Modern Provider Pattern)
# =============================================================================
# See docs/AdapterConfiguration.md for complete guide
# Note: Use double underscore (__) for nested configuration in environment variables
# --- Cache Adapter ---
# Provider options: Memory (default), Redis
ProbotSharp__Adapters__Cache__Provider=Memory
ProbotSharp__Adapters__Cache__Options__ExpirationMinutes=60
# For Redis cache, uncomment and configure:
# ProbotSharp__Adapters__Cache__Provider=Redis
# ProbotSharp__Adapters__Cache__Options__ConnectionString=localhost:6379
# ProbotSharp__Adapters__Cache__Options__ExpirationMinutes=60
# --- Idempotency Adapter ---
# Provider options: Memory (testing only), Database (default), Redis
ProbotSharp__Adapters__Idempotency__Provider=Database
ProbotSharp__Adapters__Idempotency__Options__ExpirationHours=24
# For Redis idempotency, uncomment:
# ProbotSharp__Adapters__Idempotency__Provider=Redis
# ProbotSharp__Adapters__Idempotency__Options__ConnectionString=localhost:6379
# ProbotSharp__Adapters__Idempotency__Options__ExpirationHours=24
# --- Persistence Adapter ---
# Provider options: InMemory (default), SQLite, PostgreSQL
ProbotSharp__Adapters__Persistence__Provider=InMemory
# For PostgreSQL persistence, uncomment and set connection string above:
# ProbotSharp__Adapters__Persistence__Provider=PostgreSQL
# ProbotSharp__Adapters__Persistence__Options__EnableSensitiveDataLogging=false
# ProbotSharp__Adapters__Persistence__Options__CommandTimeout=30
# --- Replay Queue Adapter ---
# Provider options: InMemory (default), FileSystem
ProbotSharp__Adapters__ReplayQueue__Provider=InMemory
ProbotSharp__Adapters__ReplayQueue__Options__MaxRetryAttempts=3
ProbotSharp__Adapters__ReplayQueue__Options__RetryBaseDelayMs=1000
ProbotSharp__Adapters__ReplayQueue__Options__PollIntervalMs=1000
# For FileSystem replay queue, uncomment:
# ProbotSharp__Adapters__ReplayQueue__Provider=FileSystem
# ProbotSharp__Adapters__ReplayQueue__Options__Path=./replay-queue
# --- Dead Letter Queue Adapter ---
# Provider options: InMemory (default), Database, FileSystem
ProbotSharp__Adapters__DeadLetterQueue__Provider=InMemory
# For Database dead letter queue (recommended for production):
# ProbotSharp__Adapters__DeadLetterQueue__Provider=Database
# For FileSystem dead letter queue:
# ProbotSharp__Adapters__DeadLetterQueue__Provider=FileSystem
# ProbotSharp__Adapters__DeadLetterQueue__Options__Path=./dead-letter-queue
# ProbotSharp__Adapters__DeadLetterQueue__Options__RetentionDays=7
# --- Metrics Adapter ---
# Provider options: NoOp (default), OpenTelemetry
ProbotSharp__Adapters__Metrics__Provider=NoOp
# For OpenTelemetry metrics, uncomment:
# ProbotSharp__Adapters__Metrics__Provider=OpenTelemetry
# ProbotSharp__Adapters__Metrics__Options__MeterName=TemplateTestBot
# ProbotSharp__Adapters__Metrics__Options__Version=1.0.0
# ProbotSharp__Adapters__Metrics__Options__OtlpEndpoint=http://localhost:4317
# --- Tracing Adapter ---
# Provider options: NoOp (default), ActivitySource, OpenTelemetry
ProbotSharp__Adapters__Tracing__Provider=NoOp
# For OpenTelemetry tracing, uncomment:
# ProbotSharp__Adapters__Tracing__Provider=OpenTelemetry
# ProbotSharp__Adapters__Tracing__Options__OtlpEndpoint=http://localhost:4317
# =============================================================================
# Feature Flags
# =============================================================================
# Enable webhook replay functionality
PROBOTSHARP_FEATURE_WEBHOOK_REPLAY=true
# Enable metrics collection
PROBOTSHARP_FEATURE_METRICS=false
# Enable health check endpoints
PROBOTSHARP_FEATURE_HEALTH_CHECKS=true
# Show detailed error messages (disable in production)
PROBOTSHARP_FEATURE_DETAILED_ERRORS=true
# =============================================================================
# Local Development Tools (Optional)
# =============================================================================
# Smee.io webhook proxy for local development
# Get a free webhook URL from https://smee.io/
# SMEE_URL=https://smee.io/your-unique-channel
# =============================================================================
# Production Configuration Example
# =============================================================================
# For production deployments, use these adapter settings:
#
# ProbotSharp__Adapters__Cache__Provider=Redis
# ProbotSharp__Adapters__Cache__Options__ConnectionString=redis:6379
# ProbotSharp__Adapters__Idempotency__Provider=Redis
# ProbotSharp__Adapters__Idempotency__Options__ConnectionString=redis:6379
# ProbotSharp__Adapters__Persistence__Provider=PostgreSQL
# ConnectionStrings__ProbotSharp=Host=db;Database=templatetestbot;Username=postgres;Password=***
# ProbotSharp__Adapters__ReplayQueue__Provider=InMemory
# ProbotSharp__Adapters__DeadLetterQueue__Provider=Database
# ProbotSharp__Adapters__Metrics__Provider=OpenTelemetry
# ProbotSharp__Adapters__Metrics__Options__OtlpEndpoint=http://otel-collector:4317
# ProbotSharp__Adapters__Tracing__Provider=OpenTelemetry
# ProbotSharp__Adapters__Tracing__Options__OtlpEndpoint=http://otel-collector:4317
# =============================================================================
# Migration from Legacy Configuration
# =============================================================================
# Old environment variables (deprecated but still supported via fallback):
# - PROBOTSHARP_CACHE_USE_REDIS → Use ProbotSharp__Adapters__Cache__Provider
# - PROBOTSHARP_IDEMPOTENCY_USE_REDIS → Use ProbotSharp__Adapters__Idempotency__Provider
# - DATABASE_CONNECTION_STRING → Use ConnectionStrings__ProbotSharp
# =============================================================================
# Notes
# =============================================================================
#
# Required Permissions:
# Make sure your GitHub App has these permissions:
# - Repository permissions: Issues (Read & Write)
# - Subscribe to webhook events: Issues
#
# Local Development:
# For local development, you can use smee.io to proxy webhooks from GitHub
# to your local machine. See: https://smee.io/
#
# Production Deployment:
# For production, use environment variables or a secrets management system
# instead of the .env file. See the Production Configuration Example above.