|
1 | | -# ────────────────────────────────────────────────────────────────────────────── |
2 | | -# Codra Environment Configuration Example |
3 | | -# Copy this file to .dev.vars for local development: cp .dev.vars.example .dev.vars |
4 | | -# ────────────────────────────────────────────────────────────────────────────── |
| 1 | +# Codra local development environment example |
| 2 | +# Copy this file to .dev.vars for local development. |
| 3 | +# Keep real secrets only in .dev.vars or your deployment secret store. |
5 | 4 |
|
6 | | -# --- GitHub App Authentication --- |
7 | | -# Create at: https://github.com/settings/apps |
8 | | -APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nREPLACE_WITH_YOUR_GITHUB_APP_PRIVATE_KEY_CONTENT\n-----END RSA PRIVATE KEY-----" |
9 | | -GITHUB_APP_ID="REPLACE_WITH_YOUR_APP_ID" |
10 | | -GITHUB_APP_SLUG="REPLACE_WITH_YOUR_APP_SLUG" |
11 | | -GITHUB_APP_WEBHOOK_SECRET="REPLACE_WITH_YOUR_WEBHOOK_SECRET" |
| 5 | +# --- Integration tests --- |
| 6 | +TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra" |
12 | 7 |
|
13 | | -# --- Dashboard OAuth (GitHub) --- |
14 | | -# Use the same GitHub App's Client ID/Secret or a separate OAuth App |
| 8 | +# --- LLM provider config encryption --- |
| 9 | +LLM_CONFIG_ENCRYPTION_KEY="REPLACE_WITH_A_LONG_RANDOM_ENCRYPTION_KEY" |
| 10 | + |
| 11 | +# --- GitHub App and OAuth --- |
| 12 | +GITHUB_APP_WEBHOOK_SECRET="REPLACE_WITH_YOUR_WEBHOOK_SECRET" |
| 13 | +GITHUB_APP_ID="REPLACE_WITH_YOUR_APP_ID" |
15 | 14 | GITHUB_CLIENT_ID="REPLACE_WITH_YOUR_CLIENT_ID" |
16 | 15 | GITHUB_CLIENT_SECRET="REPLACE_WITH_YOUR_CLIENT_SECRET" |
17 | | -AUTH_CALLBACK_URL="http://localhost:8787/auth/github/callback" |
18 | | - |
19 | | -# --- Authorization --- |
20 | | -# Comma-separated list of GitHub usernames allowed to access the dashboard |
21 | | -DASHBOARD_ALLOWED_USERS="username1,username2" |
22 | | - |
23 | | -# --- AI Intelligence (Gemini) --- |
24 | | -# Generate at: https://aistudio.google.com/app/apikey |
25 | | -GEMINI_API_KEY="REPLACE_WITH_YOUR_GEMINI_API_KEY" |
26 | | - |
27 | | -# --- Database Connections --- |
28 | | - |
29 | | -# 1. Local Development (Used by 'wrangler dev' for the HYPERDRIVE binding) |
30 | | -# This usually points to a local Postgres instance or a dev branch in Neon. |
31 | | -CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE="postgresql://user:password@localhost:5432/codra_dev" |
32 | | - |
33 | | -# 2. Migrations (Used by 'npm run migrate') |
34 | | -# This script runs via Node.js and needs a direct connection to the DB you want to migrate. |
35 | | -DATABASE_URL="postgresql://user:password@localhost:5432/codra_dev" |
36 | | - |
37 | | -# 3. Integration Tests (Used by 'npm run test') |
38 | | -# MUST be a separate database to avoid data loss during test sweeps. |
39 | | -TEST_DATABASE_URL="postgresql://user:password@localhost:5432/codra_test" |
| 16 | +APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nREPLACE_WITH_YOUR_GITHUB_APP_PRIVATE_KEY_CONTENT\n-----END RSA PRIVATE KEY-----" |
40 | 17 |
|
41 | | -# --- Cloudflare DLQ / Queue Management (Required) --- |
42 | | -# Required for DLQ inspection, replay, and purge via /api/dlq |
43 | | -# Create or identify the DLQ queue, then set CF_DLQ_ID to that queue's ID. |
44 | | -# Generate token at https://dash.cloudflare.com/profile/api-tokens (Queues:Edit permission) |
45 | | -CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" |
| 18 | +# --- Cloudflare API --- |
| 19 | +# Required permissions: Queues Edit for DLQ actions, Workers AI Read for |
| 20 | +# Cloudflare model catalog discovery. |
46 | 21 | CF_ACCOUNT_ID="REPLACE_WITH_YOUR_CLOUDFLARE_ACCOUNT_ID" |
47 | | -CF_DLQ_ID="REPLACE_WITH_YOUR_DLQ_QUEUE_ID" |
| 22 | +CF_API_TOKEN="REPLACE_WITH_CLOUDFLARE_API_TOKEN" |
48 | 23 |
|
49 | | -# --- Application Settings --- |
| 24 | +# --- Application URLs and mode --- |
50 | 25 | APP_URL="http://localhost:8787" |
51 | | -BOT_USERNAME="codra-app-dev" |
| 26 | +AUTH_CALLBACK_URL="http://localhost:8787/auth/github/callback" |
52 | 27 | ENVIRONMENT="development" |
| 28 | + |
| 29 | +# --- Database connections --- |
| 30 | +DATABASE_URL="postgresql://user:password@localhost:5432/codra_dev" |
| 31 | +CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE="postgresql://user:password@localhost:5432/codra_dev" |
0 commit comments