GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — gopherforge/microservices/.env.example at main · SuperiorChuo/gopherforge Expand file tree/ Copy path.env.exampleMore file actions 277 lines (252 loc) · 11.5 KB / Copy path.env.exampleFile metadata and controls277 lines (252 loc) · 11.5 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 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 # Copy to .env before running docker compose if you need local overrides. TZ=Asia/Shanghai APP_ENV=development # The application services and frontend live in the compose fallback profile. # Keep this enabled for the documented single-host Compose workflow. COMPOSE_PROFILES=compose-fallback # Production enables strict config validation. Replace all local defaults below before setting APP_ENV=production. # Host ports GATEWAY_PORT=8000 # 网关 HTTPS 端口(websecure entrypoint,无证书时 Traefik 自签兜底) GATEWAY_TLS_PORT=18443 # 网关层全局限流(Traefik ratelimit 令牌桶,average=每秒稳定速率,burst=突发上限) GATEWAY_RATE_AVERAGE=100 GATEWAY_RATE_BURST=200 # Let's Encrypt 联系邮箱按域名在“系统管理 → 边缘证书”登记。 # system-service 是唯一 ACME owner,不再启用 Traefik 内建 certresolver。 FRONTEND_PORT=3000 # Business services trust gateway-injected X-Auth-* headers, so their host # ports bind loopback only by default. Set SERVICES_BIND_IP=0.0.0.0 ONLY if # you understand this exposes header-forgeable endpoints to the network. #SERVICES_BIND_IP=127.0.0.1 BACKEND_PORT=8081 AUTH_SERVICE_PORT=8082 IDENTITY_SERVICE_PORT=8083 SYSTEM_SERVICE_PORT=8084 AUDIT_SERVICE_PORT=8085 FILE_SERVICE_PORT=8086 AI_SERVICE_PORT=8087 CC_SERVICE_PORT=8089 CRM_SERVICE_PORT=8091 MP_SERVICE_PORT=8092 TICKET_SERVICE_PORT=8094 NOTIFY_SERVICE_PORT=8095 NATS_PORT=4222 POSTGRES_PORT=5432 REDIS_PORT=6379 PROMETHEUS_PORT=9090 GRAFANA_PORT=3003 # PostgreSQL POSTGRES_DB=go_admin_kit # Development default only; production must use a strong non-default password. POSTGRES_PASSWORD=123456 POSTGRES_USER=postgres DB_SSLMODE=disable # 每服务连接池上限(默认 10/5)。预算口径:sum(副本数×MaxOpen) 必须 # 留在 PG max_connections 之内,调大前先核对副本布局。 #DB_MAX_OPEN_CONNS=10 #DB_MAX_IDLE_CONNS=5 # Redis # Development can leave this empty; production must set a strong password. REDIS_PASSWORD= REDIS_DB=0 # Console cookie-session auth tuning. Both default to sane values; set them only # to trade freshness against database load. # TTL (seconds) of the cached session-validation result. Logout, force-logout and # account disable/delete all invalidate it explicitly, so this only bounds paths # with no explicit invalidation. 0 disables the cache (validate on every request). #CONSOLE_SESSION_CACHE_TTL_SECONDS=30 # Minimum age of console_sessions.last_seen_at before an authenticated request # refreshes it. 0 restores a write on every request. #CONSOLE_SESSION_TOUCH_INTERVAL_SECONDS=60 # AI service. Provider-agnostic: point AI_BASE_URL at any OpenAI-compatible # endpoint (DeepSeek/Qwen/Ollama) or set AI_PROVIDER=anthropic. Empty # AI_API_KEY leaves the service running with AI endpoints returning 503. #AI_PROVIDER=openai #AI_BASE_URL= #AI_API_KEY= #AI_CHAT_MODEL= #AI_EMBED_MODEL= # AI provider API key 的落库加密密钥(AES-256)。必须恰好 32 字节, # APP_ENV=production 时不配会导致 ai-service 启动失败。生成: # head -c 24 /dev/urandom | base64 | cut -c1-32 #ENCRYPTION_KEY= # 边缘证书密钥库(system-service)。密钥是 base64(raw 32 bytes): # openssl rand -base64 32 # Swarm 部署时不要把值写入 .env,先创建外部 secret: # printf '%s' "$EDGE_CERT_ENCRYPTION_KEY" | docker secret create go-admin-kit-edge-cert-encryption-key - #EDGE_CERT_CURRENT_KEY_ID=v1 #EDGE_CERT_ENCRYPTION_SECRET_NAME=go-admin-kit-edge-cert-encryption-key # 仅 compose-fallback/本地调试从环境读取;生产使用上述 Swarm secret。 #EDGE_CERT_ENCRYPTION_KEY= # 轮换窗口可选旧 key;旧 envelope 全部重包装后移除。 #EDGE_CERT_PREVIOUS_KEY_ID= #EDGE_CERT_PREVIOUS_ENCRYPTION_SECRET_NAME= # compose-fallback 本地调试可用;Swarm 生产仍只使用上面的 external secret。 #EDGE_CERT_PREVIOUS_ENCRYPTION_KEY= #EDGE_CERT_WORKER_ENABLED=true #EDGE_CERT_RENEW_BEFORE_DAYS=30 #EDGE_CERT_TASK_POLL_SECONDS=5 #EDGE_CERT_CHALLENGE_TTL_MINUTES=15 # 两阶段升级:首轮保持 false 兼容旧镜像;确认 V2 稳定且旧镜像退出回滚窗口后 # 改 true 并重启 system,启动门禁会验证密文后清除 legacy 明文列。 #EDGE_CERT_CLEAR_LEGACY_SECRETS=false # Hermes 控制面策略签名使用独立 Ed25519 密钥,不复用 ENCRYPTION_KEY。 # 可填写 base64 编码的 32 字节 seed 或 64 字节 private key;留空时其它 AI # 功能照常启动,Hermes 策略发布和设备注册完成接口返回 503。 #HERMES_POLICY_SIGNING_KEY= #HERMES_VERIFICATION_URI=/hermes/mine # NATS (auth events). Compose wires services to nats://go-admin-kit-nats:4222; # for bare-metal runs set NATS_URL=nats://localhost:4222. Empty disables events. #NATS_URL= # CC service (freeswitch-cc control-api integration). Webhook HMAC secret must # match the control-api side; empty disables signature verification (dev only). # Under APP_ENV=production an empty/placeholder value makes the webhook endpoint # return 503 rather than silently skipping verification. # Empty CC_FS_API_BASE disables the fs/status and fs/webhook-test proxies. #CC_WEBHOOK_SECRET= # CDR intake (mod_json_cdr -> POST /api/v1/cc/cdr) uses HTTP Basic, "user:pass". # NOTE the asymmetric naming: it is CC_CDR_AUTH here, but the freeswitch-cc side # supplies the SAME value under the name CC_CDR_CRED (that repo's .env plus # freeswitch/conf/autoload_configs/json_cdr.conf.xml). Both sides must hold an # identical value or every CDR post is rejected. Empty skips the Basic check in # dev; under APP_ENV=production the endpoint returns 503. #CC_CDR_AUTH=user:change-me-cdr-basic-pass #CC_FS_API_BASE=http://10.0.0.10:18090 #CC_FS_TOKEN= #CC_RECORDING_PUBLIC_BASE= # WebPhone SIP over WebSocket. HTTP pages default to ws://<page-host>:5066; # production containers should set an externally reachable, publicly trusted # wss:// endpoint here. This runtime value does not require rebuilding the UI. #CC_SIP_WSS_URL=wss://pbx.example.com:7443 # Legacy build-time fallback for non-container deployments. #VITE_CC_SIP_WS_URL=wss://pbx.example.com:7443 # Identity owner API and its AI/CRM/BPM/Notify/Visibility clients share this # intra-product credential. Set a strong random value (e.g. openssl rand -hex 32) # before using the complete business workflows. Empty keeps owner APIs closed. # This is separate from external vendor credentials and JWT_SECRET. INTERNAL_TOKEN= # CC×CRM link (号码识客 + 挂机写 CRM 跟进). crm-service internal endpoints use a # shared token (X-Internal-Token); cc calls crm directly on the internal network. # Set the SAME value on both sides. Empty disables the link (识客只返回 cc 侧数据). #CRM_INTERNAL_TOKEN=change-me-cc-crm-internal-token #CC_CRM_API_BASE=http://go-admin-kit-crm:8091 # Notify center (站内信 + 多通道). ticket/IM 共用同一 internal token。 #NOTIFY_INTERNAL_TOKEN=dev-notify-internal-token #NOTIFY_API_BASE=http://go-admin-kit-notify:8095 # 语音通知:notify 入队 cc-service 内部端点,与 INTERNAL_TOKEN 同源。 #NOTIFY_CC_API_BASE=http://go-admin-kit-cc:8089 #NOTIFY_CC_INTERNAL_TOKEN= #CC_INTERNAL_TOKEN= # notify 调 system 真实短信端点;两端必须使用同一个强随机值,留空则生产短信关闭。 #SYSTEM_INTERNAL_TOKEN=replace-with-at-least-32-random-characters # 邮件(可选)。配齐 HOST+FROM 后,把模板 channels 设为 inbox,email 才会外发。 #NOTIFY_SMTP_HOST=smtp.example.com #NOTIFY_SMTP_PORT=587 #NOTIFY_SMTP_USER= #NOTIFY_SMTP_PASSWORD= #NOTIFY_SMTP_FROM=Notify <[email protected]> # 短信 stub 仅供演示;真实发送由 system 短信渠道与模板承接。 #NOTIFY_SMS_MODE=stub #NOTIFY_DEFAULT_CHANNELS=inbox # Prompt library TTS (OpenAI-compatible /v1/audio/speech). Empty CC_TTS_URL # disables the TTS generate button (upload/record still works). Base URL only, # without the /v1/audio/speech suffix. #CC_TTS_URL=https://api.openai.com #CC_TTS_KEY= #CC_TTS_MODEL=tts-1 #CC_TTS_VOICE=alloy # Recording transcription QC ASR (OpenAI-compatible /v1/audio/transcriptions). # Empty CC_ASR_URL disables the transcribe button on the calls page. Base URL # only, without the /v1/audio/transcriptions suffix. #CC_ASR_URL=https://api.openai.com #CC_ASR_KEY= #CC_ASR_MODEL=whisper-1 # Docker socket mounted into the Traefik gateway for service discovery. # Docker Desktop for Mac: use /var/run/docker.sock.raw (the plain socket # denies in-container access). Linux: keep the default. #DOCKER_SOCK=/var/run/docker.sock # Backend # Development default only; production requires at least 32 non-placeholder characters. JWT_SECRET=local-dev-secret-change-me-32-chars JWT_REFRESH_TOKEN_ROTATION=true PASSWORD_MAX_AGE_DAYS=90 PASSWORD_HISTORY_COUNT=5 GITHUB_OAUTH_ENABLED=false GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= GITHUB_REDIRECT_URI=http://localhost:8000/api/v1/oauth/github/callback WECHAT_OAUTH_ENABLED=false WECHAT_CLIENT_ID= WECHAT_CLIENT_SECRET= WECHAT_REDIRECT_URI=http://localhost:8000/api/v1/oauth/wechat/callback UPLOAD_STORAGE_TYPE=local UPLOAD_LOCAL_PATH=./uploads UPLOAD_PUBLIC_BASE_URL=/uploads UPLOAD_LOCAL_URL_PREFIX=/uploads # /uploads 与 /im/uploads 签名 URL 的 HMAC 密钥;留空时回退各服务 JWT_SECRET UPLOAD_URL_SIGN_SECRET= # 签名 URL 有效期(秒),缺省 900 UPLOAD_URL_SIGN_TTL_SECONDS=900 # S3 兼容云通用(阿里 OSS/腾讯 COS/七牛均可):endpoint 填云商 S3 兼容端点, # BUCKET_LOOKUP 阿里/腾讯官方端点用 dns,MinIO/IP 端点用 path,缺省 auto UPLOAD_S3_ENDPOINT= UPLOAD_S3_BUCKET= UPLOAD_S3_REGION= UPLOAD_S3_BUCKET_LOOKUP= UPLOAD_S3_ACCESS_KEY= UPLOAD_S3_SECRET_KEY= UPLOAD_S3_USE_SSL=true UPLOAD_MINIO_ENDPOINT=go-admin-kit-minio:9000 UPLOAD_MINIO_BUCKET=go-admin-kit UPLOAD_MINIO_REGION=us-east-1 UPLOAD_MINIO_ACCESS_KEY=minioadmin UPLOAD_MINIO_SECRET_KEY=minioadmin UPLOAD_MINIO_USE_SSL=false CORS_ALLOW_ORIGINS=http://localhost:8000,http://127.0.0.1:8000,http://localhost:3000,http://127.0.0.1:3000,http://localhost:3001,http://127.0.0.1:3001,http://localhost:3002,http://127.0.0.1:3002 CORS_ALLOW_CREDENTIALS=true METRICS_ENABLED=true # Code generator repository write (development only; disabled by default). #CODEGEN_WRITE_ENABLED=false #CODEGEN_REPO_ROOT=/absolute/path/to/go-admin-kit # Optional email notifications EMAIL_NOTIFICATION_ENABLED=false EMAIL_SMTP_HOST= EMAIL_SMTP_PORT=25 EMAIL_SMTP_USERNAME= EMAIL_SMTP_PASSWORD= EMAIL_SENDER= EMAIL_ALERT_RECEIVER= EMAIL_ALERT_RECEIVERS= EMAIL_SUBJECT_TEMPLATE= EMAIL_BODY_TEMPLATE= EMAIL_USE_TLS=false EMAIL_START_TLS=false # 告警内置引擎的额外通知渠道(可选;留空则该渠道跳过) # 站内信:monitor → notify 服务的内部告警端点 NOTIFY_INTERNAL_BASE_URL= NOTIFY_INTERNAL_TOKEN= # 企业微信机器人 webhook(群机器人) ALERT_WECOM_WEBHOOK_URL= # Optional storage profile MINIO_API_PORT=9000 MINIO_CONSOLE_PORT=9001 MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin # Optional monitoring profile GRAFANA_ADMIN_USER=admin GRAFANA_ADMIN_PASSWORD=admin # 审计日志保留策略:操作/登录日志保留天数,<=0(默认)关闭自动清理; # 业务审计日志(audit_logs)不在自动清理范围。扫描周期默认一天, # 可用 AUDIT_LOG_RETENTION_SCAN_INTERVAL_SECONDS 调整。 AUDIT_LOG_RETENTION_DAYS=0 # 开放平台 Webhook:32 字节随机密钥的标准 Base64,仅用于本地 compose。 # Swarm 生产请创建 go-admin-kit-webhook-encryption-key secret,禁止提交真实值。 WEBHOOK_ENCRYPTION_KEY= WEBHOOK_KEY_ID=current WEBHOOK_ALLOW_HTTP=false WEBHOOK_ALLOW_PRIVATE=false WEBHOOK_SCAN_INTERVAL_SECONDS=2 WEBHOOK_BATCH_SIZE=50 WEBHOOK_MAX_ATTEMPTS=5 WEBHOOK_REQUEST_TIMEOUT_SECONDS=10 |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |