Repository navigation
Expand file tree
/
Copy path.env.dev.example
More file actions
204 lines (188 loc) · 9.96 KB
/
Copy path.env.dev.example
File metadata and controls
204 lines (188 loc) · 9.96 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
# Development environment example. Copy to .env.dev and adjust.
# Real .env.dev is gitignored and must not be committed (SPEC-019 REQ-1901).
POSTGRES_USER=ai_stp
POSTGRES_PASSWORD=ai_stp_dev
POSTGRES_DB=ai_stp
AI_STP_DB_URL=postgresql+asyncpg://ai_stp:ai_stp_dev@postgres:5432/ai_stp
AI_STP_DB_POOL_SIZE=5
AI_STP_STORAGE_ENDPOINT=http://rustfs:9000
AI_STP_STORAGE_BUCKET=ai-stp-dev
AI_STP_STORAGE_ACCESS_KEY_ID=ai_stp
AI_STP_STORAGE_SECRET_ACCESS_KEY=ai_stp_dev
AI_STP_STORAGE_REGION=us-east-1
AI_STP_STORAGE_KEY_PREFIX=objects
RUSTFS_ACCESS_KEY=ai_stp
RUSTFS_SECRET_KEY=ai_stp_dev
AI_STP_API_ENVIRONMENT=dev
AI_STP_API_LOG_DIR=/var/log/ai_stp
# AI_STP_API_OTEL_EXPORTER_ENDPOINT=http://otel-collector:4318/v1/traces
# Single-node MVP policy (ADR-0128): 100 requests per minute overall and
# 1000 requests per hour per transport peer, with a bounded 2048-key
# memory budget for the per-peer table. Explicit 0 disables that dimension.
AI_STP_API_RATE_LIMIT_OVERALL_REQUESTS=100
AI_STP_API_RATE_LIMIT_OVERALL_WINDOW_SECONDS=60
AI_STP_API_RATE_LIMIT_IP_REQUESTS=1000
AI_STP_API_RATE_LIMIT_IP_WINDOW_SECONDS=3600
AI_STP_API_RATE_LIMIT_MAX_KEYS=2048
# Same rule as the prod example: X-Forwarded-* is trusted only from the named
# proxies; dev nginx is on the host, so the loopback default is correct.
# AI_STP_FORWARDED_ALLOW_IPS=127.0.0.1
AI_STP_WORKER_WORKER_ID=worker-dev
AI_STP_WORKER_BATCH_SIZE=10
AI_STP_WORKER_POLL_INTERVAL_SECONDS=1.0
AI_STP_WORKER_LOG_DIR=/var/log/ai_stp
# Public GitHub token for Official upstream and catalog stars.
# Sent only to api.github.com. Unauthenticated GitHub allows 60 requests/hour;
# a catalog of many git sources exceeds that. Fine-grained: public metadata
# read only. Never commit the real value.
AI_STP_WORKER_GITHUB_TOKEN=
# Invitation mail provider: auto | resend | smtp | recording.
# auto = Resend when a key is set, else SMTP when a relay host is set, else
# the recording port (deliveries marked sent in the corporate_mail_delivery
# ledger, but nothing leaves the host).
# AI_STP_WORKER_MAIL_PROVIDER=auto
# SMTP — the generic path: your domain mailbox's SMTP (Google Workspace,
# Zoho, Yandex 360, ...), a self-hosted MTA (Mailcow/Postal), or a local
# catch-all. Dev compose ships Mailpit (web UI :8025); its defaults live in
# deploy/mailpit.env and load before this file, so values set here win.
# TLS flags follow the endpoint: 465 implicit TLS (USE_TLS=true), 587
# STARTTLS (USE_STARTTLS=true), or a plain listener with both false
# (Mailpit).
# AI_STP_WORKER_SMTP_HOST=mailpit
# AI_STP_WORKER_SMTP_PORT=1025
# AI_STP_WORKER_SMTP_USERNAME=
# AI_STP_WORKER_SMTP_PASSWORD=
# AI_STP_WORKER_SMTP_USE_TLS=false
# AI_STP_WORKER_SMTP_USE_STARTTLS=false
# Resend — hosted delivery. Needs a verified sender domain (DNS records in
# the Resend dashboard). corporate_resend_api_key falls back to
# resend_api_key when empty; the shared key also delivers grant invites.
# AI_STP_WORKER_RESEND_API_KEY=re_...
# AI_STP_WORKER_CORPORATE_RESEND_API_KEY=re_...
# AI_STP_WORKER_CORPORATE_MAIL_FROM_ADDRESS=invitations@example.com
# Public base URL used to build invitation accept links inside the email
# body. Include the locale segment — accept pages only exist under
# /<locale>/ (bare paths 404; a next.config redirect is the safety net).
# AI_STP_WORKER_INVITATION_BASE_URL=http://localhost:3000/ru
# S3/RustFS bucket holding the invitation template (key: mail/corporate-invitation.txt).
# AI_STP_WORKER_CORPORATE_MAIL_TEMPLATE_BUCKET=
# Safety worker (deploy/docker/Dockerfile.app, worker-safety stage): external scanners + OSV offline mount.
AI_STP_SAFETY_EXTERNAL_CLI=1
AI_STP_SAFETY_SANDBOX=auto
AI_STP_OSV_OFFLINE_DIR=/var/lib/ai_stp/osv
OSV_SCANNER_LOCAL_DB_CACHE_DIRECTORY=/var/lib/ai_stp/osv
AI_STP_OSV_MAX_AGE_HOURS=36
# Optional: fail worker readiness when OSV offline DB is missing/stale.
# AI_STP_OSV_REQUIRE_FRESH=0
# HMAC secret for opaque public-catalog cursors (ADR-0042). No default; min 32 chars.
# AI_STP_CATALOG_CURSOR_SIGNING_SECRET=
# Web tier (SPEC-024 REQ-2402, ADR-0044). Names only; real values stay in gitignored .env.dev.
# Build-time deploy profile. Restart Next completely after changing it; HMR is insufficient.
# Deliberately not the config default: features.yaml defaults to public_saas;
# local development keeps the SaaS surface off unless explicitly enabled.
# corporate_hub is the full corporate build (corporate URL space, SSO login).
AI_STP_WEB_PROFILE=self_hosted
# Optional exact boolean build override. Leave unset to use the selected profile.
# AI_STP_FEATURE_CONTENT_HUB=false
# Public origin is the published web port (no proxy in local dev).
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Official GA / Yandex Metrika. Empty id = that vendor off. Set
# NEXT_PUBLIC_ANALYTICS_ENABLED=false to disable both even when ids are set.
NEXT_PUBLIC_ANALYTICS_ENABLED=true
NEXT_PUBLIC_GA_MEASUREMENT_ID=
NEXT_PUBLIC_YANDEX_METRIKA_COUNTER_ID=
NEXT_PUBLIC_COOKIE_CONSENT_ENABLED=true
# User documentation is served by the separate docs compose service.
AI_STP_USER_DOCS_URL=http://localhost:8011
AI_STP_USER_DOCS_PORT=8011
# Contact form recipient. Keep unset to show a disabled, explicit placeholder.
# NEXT_PUBLIC_CONTACT_EMAIL=hello@example.com
# Server-side API base: internal compose network, never the public origin.
AI_STP_API_BASE_URL=http://api:8000
# Dev may use in-process mocks; an integrated smoke run sets this false.
AI_STP_USE_MOCKS=false
# Real OAuth/account/devices against the API (provider credentials below).
AI_STP_MOCK_AUTH=false
# Cookie signing secret for the opaque web session (ADR-0041). Minimum 32 chars.
AI_STP_SESSION_SECRET=dev-only-change-me-to-a-long-random-string
# Scoped bearer for repository article snapshot import (SPEC-054). Compose already
# supplies a throwaway default; set this to override it. Empty forbids import.
# AI_STP_CONTENT_IMPORT_TOKEN=
# Optional SEO enrichment (SPEC-053). Default compose leaves this off. The
# seo_enrichment profile starts LiteLLM and CLIPROXY on the internal network.
# Session is JSON in deploy/cliproxy/auths (copy that directory to a server).
# Those three CLIPROXY values are interpolated only into the LiteLLM container.
# AI_STP_SEO_ENRICHMENT_ENABLED=true
# AI_STP_SEO_ENRICHMENT_URL=http://litellm:4000/v1/chat/completions
# AI_STP_SEO_ENRICHMENT_CREDENTIAL=
# AI_STP_CLIPROXY_URL=http://cliproxy:8317/v1
# AI_STP_CLIPROXY_API_KEY=sk-none
# AI_STP_CLIPROXY_MODEL=openai/seo-writer
# API auth (ADR-0041).
# public_base_url = browser site after login (web origin). OAuth redirect_uri is
# {oauth_redirect_base_url or public_base_url}/v1/auth/{provider}/callback and
# MUST match the provider console exactly.
# AI_STP_AUTH_SECRET_KEY=
# AI_STP_AUTH_PUBLIC_BASE_URL=http://localhost:3000
# If Google/GitHub still list :8000 callbacks (legacy local API port):
# AI_STP_AUTH_OAUTH_REDIRECT_BASE_URL=http://localhost:8000
# AI_STP_AUTH_COOKIE_SECURE=false
# AI_STP_AUTH_COOKIE_SAMESITE=lax
# AI_STP_AUTH_GOOGLE_CLIENT_ID=
# AI_STP_AUTH_GOOGLE_CLIENT_SECRET=
# AI_STP_AUTH_GITHUB_CLIENT_ID=
# AI_STP_AUTH_GITHUB_CLIENT_SECRET=
# Corporate OIDC (ADR-0218): issuer + client pair per provider.
# AI_STP_AUTH_AUTHENTIK_ISSUER_URL=
# AI_STP_AUTH_AUTHENTIK_CLIENT_ID=
# AI_STP_AUTH_AUTHENTIK_CLIENT_SECRET=
# AI_STP_AUTH_KEYCLOAK_ISSUER_URL=
# AI_STP_AUTH_KEYCLOAK_CLIENT_ID=
# AI_STP_AUTH_KEYCLOAK_CLIENT_SECRET=
# Self-managed GitLab sign-in (ADR-0223): the issuer is the instance base URL.
# AI_STP_AUTH_GITLAB_ISSUER_URL=
# AI_STP_AUTH_GITLAB_CLIENT_ID=
# AI_STP_AUTH_GITLAB_CLIENT_SECRET=
# SAML 2.0 sign-in (ADR-0226): metadata URL alone, or SSO URL + PEM bundle
# (inline or file path; multiple certs are the rotation overlap).
# Register ACS {public_base}/v1/auth/saml/acs at the IdP; runbook saml-sso.md.
# AI_STP_AUTH_SAML_IDP_METADATA_URL=
# AI_STP_AUTH_SAML_IDP_ENTITY_ID=
# AI_STP_AUTH_SAML_IDP_SSO_URL=
# AI_STP_AUTH_SAML_IDP_CERTIFICATES=
# AI_STP_AUTH_SAML_SP_ENTITY_ID=
# AI_STP_AUTH_SAML_ATTRIBUTE_EMAIL=
# AI_STP_AUTH_SAML_ATTRIBUTE_DISPLAY_NAME=
# AI_STP_AUTH_SAML_ORGANIZATION_ID=
# AI_STP_AUTH_SAML_IDP_ONLY=false
# Web login page: comma-separated corporate providers that render SSO buttons.
# List only providers configured on the API above; empty hides the buttons.
# AI_STP_AUTH_SSO_PROVIDERS=authentik,keycloak
# Web login page: comma-separated primary sign-in buttons (google, github,
# gitlab). Unset defaults to google,github; an explicit empty value hides them,
# so a corporate deployment can offer gitlab instead of github — or only SSO.
# AI_STP_AUTH_PROVIDERS=google,gitlab
# API: comma-separated provider names that are unreachable even when their
# credentials are set — authorize, callback, link, device and CLI login all
# refuse with "unsupported oauth provider".
# AI_STP_AUTH_DISABLED_PROVIDERS=github
# GitHub App connector (source access and repository administration). This is
# separate from the GitHub OAuth sign-in credentials above. Use the local App
# slug and keep all filled values only in the gitignored .env.dev file.
AI_STP_GITHUB_CONNECTOR_CLIENT_ID=
AI_STP_GITHUB_CONNECTOR_CLIENT_SECRET=
AI_STP_GITHUB_CONNECTOR_APP_SLUG=ai-stp-local
# URL-safe base64 for exactly 32 random bytes; use a different key in production.
AI_STP_GITHUB_CONNECTOR_ENCRYPTION_KEY=
# Hard off-switch: every connector route answers "connector_not_configured"
# even when the App credentials above are set; the web connector UI hides.
# AI_STP_GITHUB_CONNECTOR_DISABLED=true
# GitLab connections (ADR-0224): JSON keyed by organization ID. Each entry is a
# GitLabConnection — base_url, allowed_hosts, the operator PAT `token` for
# discovery, and optionally the instance OAuth application
# (oauth_client_id/oauth_client_secret) that issues read-only user grants.
# AI_STP_GITLAB_CONNECTIONS={"organization_x": {"base_url": "https://gitlab.example.com", "token": "...", "allowed_hosts": ["gitlab.example.com"], "oauth_client_id": "...", "oauth_client_secret": "..."}}
# URL-safe base64 for exactly 32 random bytes; encrypts connector grant tokens.
# AI_STP_GITLAB_CONNECTOR_ENCRYPTION_KEY=
# Optional PEM file with the internal CA root for self-managed GitLab TLS.
# AI_STP_GITLAB_CA_BUNDLE=