Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
138 lines (127 loc) · 7.91 KB
/
Copy path.env.example
File metadata and controls
138 lines (127 loc) · 7.91 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
# * Licensed to the Apache Software Foundation (ASF) under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The ASF licenses this file to You under the Apache License, Version 2.0
# * (the "License"); you may not use this file except in compliance with
# * the License. You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
#
# RocketMQ Studio Docker Environment
# Remote deployment target
REMOTE_HOST=your-server-ip
REMOTE_USER=root
REMOTE_PATH=/opt/rocketmq-studio
# Optional local server build settings. deploy.sh mounts this directory into
# the Maven build container, so downloaded dependencies persist across builds.
# MAVEN_CACHE_DIR=/home/your-user/.m2
# MAVEN_IMAGE=maven:3.9.9-eclipse-temurin-21
# Frontend public port
PUBLIC_PORT=6789
# Login protection is disabled by default for local development.
# Set STUDIO_AUTH_LOGIN_REQUIRED=true and provide credentials in shared environments.
STUDIO_AUTH_LOGIN_REQUIRED=false
# The admin credentials below are a bootstrap seed: on the first login against an empty
# database they are written to the rmq_studio_user table, after which accounts are managed
# in the Studio user-management page and these values are no longer used.
#
# DO NOT leave these blank while STUDIO_AUTH_LOGIN_REQUIRED=true. That is not a safe
# "I will set it later" state — it locks everybody out, and this was measured on a real
# deployment. The chain: docker-compose forwards them as ${VAR:-}, so the container receives
# an EMPTY STRING rather than an unset variable; application.yml's ${STUDIO_AUTH_ADMIN_USERNAME:admin}
# default only applies when the variable is UNSET; AuthProperties.configuredUsers() drops entries
# with a blank username or password; AuthService.ensureBootstrapUsers() then throws
# 503 "No Studio users are configured". No account can be created, nobody can log in, and the
# settings page that would turn login back off itself requires authentication.
#
# Safe ordering: set both values -> restart the server -> log in ONCE while login is still
# optional (seeding is lazy, so this creates the admin row) -> confirm the row exists in
# rmq_studio_user -> only then set STUDIO_AUTH_LOGIN_REQUIRED=true. Seeding before enforcement
# means there is no window in which nobody can get in.
STUDIO_AUTH_ADMIN_USERNAME=admin
STUDIO_AUTH_ADMIN_PASSWORD=change-me
# Optional Prometheus-compatible data source for the built-in metrics proxy.
# `deploy/rocketmq/docker-compose.yml` ships a `rocketmq-prometheus` container on the
# shared `rocketmq_net` network that scrapes both brokers, so the container name below
# works as-is once that stack is up. Do not use localhost/127.0.0.1: UrlHostGuard blocks
# loopback for metrics data sources and the query fails with "base URL is invalid".
STUDIO_METRICS_PROMETHEUS_BASE_URL=http://rocketmq-prometheus:9090
STUDIO_METRICS_PROMETHEUS_USERNAME=
STUDIO_METRICS_PROMETHEUS_PASSWORD=
STUDIO_METRICS_PROMETHEUS_BEARER_TOKEN=
# Optional comma-separated environment variable names that CLI-backed AI
# providers may inherit in addition to Studio's minimal built-in allowlist.
# Values are read from the rocketmq-server environment; do not list unrelated
# server secrets here.
RMQ_LLM_CLI_ALLOWED_ENVIRONMENT=
# ─────────────────────────────────────────────────────────────────────────────
# ⚠️ Putting a variable in this file is NOT enough on its own.
# docker compose only forwards what the service's `environment:` block declares,
# so every variable below must also appear in deploy/docker-compose.yml as
# `NAME: ${NAME:-}`. A variable present here but missing there silently never
# reaches the container. That exact gap took MCP authentication down on a live
# deployment (every call returned 401) while /api/topics kept returning 200,
# because that endpoint serves Studio's own metadata rows and needs no
# credential — so it masks the failure. Verify with:
# docker exec rocketmq-server printenv SPRING_APPLICATION_JSON
# ─────────────────────────────────────────────────────────────────────────────
# LLM gateway credential for the CLI-backed engines (claude-code / qoder).
# RMQ_LLM_TOKEN takes precedence over the api key stored in rmq_settings, so a
# key saved through the settings page is dead config while this is set.
# When RMQ_ANTHROPIC_BASE_URL is set it is used verbatim; when it is blank,
# ClaudeCodeAgentProvider derives the Anthropic base from the configured apiBase
# by rewriting a trailing /compatible-mode/v1 into /apps/anthropic.
RMQ_LLM_TOKEN=
RMQ_ANTHROPIC_BASE_URL=
# MCP server (endpoint /api/mcp, consumed by rmqctl and by external agents).
# STUDIO_AI_TOKEN_SECRET signs the confirm tokens used by the L2/L3 mutation
# preview/apply flow. Leave it blank and every mutation tool answers
# "UNAVAILABLE: Tool confirmation tokens are unavailable". Must be base64 of at
# least 32 bytes after decoding. Generate one with: openssl rand -base64 32
STUDIO_AI_TOKEN_SECRET=
# Gate for L3 (high-risk) tools. Defaults to false, so a hosted agent cannot run
# them unless this is explicitly turned on.
STUDIO_AI_ALLOW_L3_TOOLS=false
# Admin credentials for open-source (vendor=APACHE) instances, keyed by the
# credential ref stored in rmq_instance.admin_credential_ref. This is how the
# instance bound to a conversation authenticates to its broker, and it is also
# the secret rmqctl signs its HMAC requests with. Inject it only through this
# environment variable — never commit real credentials.
# Shape (single line, valid JSON):
# {"studio":{"cluster":{"admin":{"credentials":{"<ref>":{"accessKey":"<ak>","secretKey":"<sk>"}}}}}}
SPRING_APPLICATION_JSON=
# 邮件通知通道的 SMTP 接入点。Spring Boot 只在 spring.mail.host 存在时装配 JavaMailSender;
# 留空则告警邮件投递报 "SMTP is not configured"。收件人另在「设置 → 通知设置」配置。
# 测试机参考:mailpit 本地收件箱(容器 studio-mailpit,SMTP 1025 / UI 8025,端口只绑 127.0.0.1):
# SPRING_MAIL_HOST=studio-mailpit
# SPRING_MAIL_PORT=1025
# SPRING_MAIL_HOST=
# SPRING_MAIL_PORT=25
# AI conversation persistence, retention and the hosted-agent workspace.
# All optional; these are the defaults.
# STUDIO_AI_CONVERSATION_RETENTION_DAYS=90
# STUDIO_AI_CONVERSATION_CLEANUP_BATCH_SIZE=500
# STUDIO_AI_CONVERSATION_CLEANUP_MAX_BATCHES=20
# STUDIO_AI_CONVERSATION_CLEANUP_INTERVAL=PT24H
# STUDIO_AI_CONVERSATION_ORPHAN_RUN_TIMEOUT=PT10M
# STUDIO_AI_CONVERSATION_STOP_GRACE=PT3S
# Per-conversation agent workspace root. Holds rmqctl.yaml, mcp.json and the
# HOME directory the agent CLI needs for --resume. NOTE: a container restart
# wipes /tmp, which invalidates resumable sessions; the server detects that and
# retries once without --resume. Mount a volume here to keep sessions across
# restarts.
# STUDIO_AI_CONVERSATION_WORKSPACE_DIR=/tmp/rocketmq-studio-ai
# Set to false to run the agent without RocketMQ tools (plain chat). Also falls
# back to this automatically when the rmqctl binary is absent.
# STUDIO_AI_RMQCTL_ENABLED=true
# Blank means "derive from server.port on loopback", which is what you want:
# rmqctl rejects plain HTTP for any non-loopback host. Only set this to an
# https URL when rmqctl runs somewhere other than inside the server container.
# STUDIO_AI_RMQCTL_SERVER_URL=
# STUDIO_AI_RMQCTL_TIMEOUT=PT60S