Skip to content

Commit 493760b

Browse files
yasinBursaliclaude
andcommitted
fix(extensions-library): add setup hooks for anythingllm and flowise
Both services require secrets via compose :? syntax but had no mechanism to auto-generate them. Add env_vars declarations to manifests and setup.sh scripts that generate required secrets on first install. - anythingllm: ANYTHINGLLM_JWT_SECRET, ANYTHINGLLM_AUTH_TOKEN - flowise: FLOWISE_USERNAME (default: admin), FLOWISE_PASSWORD Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent af07063 commit 493760b

4 files changed

Lines changed: 64 additions & 0 deletions

File tree

resources/dev/extensions-library/services/anythingllm/manifest.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ service:
1919
All-in-one AI productivity tool for RAG chat with documents.
2020
Built-in vector database, supports multiple LLM providers,
2121
and runs entirely on-device for privacy.
22+
env_vars:
23+
- key: ANYTHINGLLM_JWT_SECRET
24+
required: true
25+
secret: true
26+
description: "JWT secret for session tokens (auto-generated by setup.sh)"
27+
- key: ANYTHINGLLM_AUTH_TOKEN
28+
required: true
29+
secret: true
30+
description: "API authentication token (auto-generated by setup.sh)"
31+
setup_hook: setup.sh
2232

2333
features:
2434
- id: rag-chat
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
# AnythingLLM — generate required secrets if not already set
3+
# Usage: setup.sh INSTALL_DIR GPU_BACKEND
4+
5+
set -eu
6+
7+
ENV_FILE="${1:-.}/.env"
8+
9+
generate_secret() {
10+
openssl rand -hex 32
11+
}
12+
13+
# Only append if the variable is not already defined in .env
14+
append_if_missing() {
15+
key="$1"
16+
value="$2"
17+
if [ -f "$ENV_FILE" ] && grep -q "^${key}=" "$ENV_FILE" 2>/dev/null; then
18+
return 0
19+
fi
20+
echo "${key}=${value}" >> "$ENV_FILE"
21+
}
22+
23+
append_if_missing "ANYTHINGLLM_JWT_SECRET" "$(generate_secret)"
24+
append_if_missing "ANYTHINGLLM_AUTH_TOKEN" "$(generate_secret)"

resources/dev/extensions-library/services/flowise/manifest.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ service:
1919
Visual LLM workflow builder with drag-and-drop interface.
2020
Build AI agents, chatbots, and automation flows without code.
2121
Integrates with OpenAI, Anthropic, local models, and 100+ tools.
22+
env_vars:
23+
- key: FLOWISE_USERNAME
24+
required: true
25+
secret: false
26+
description: "Admin username for Flowise UI (default: admin)"
27+
default: "admin"
28+
- key: FLOWISE_PASSWORD
29+
required: true
30+
secret: true
31+
description: "Admin password for Flowise UI (auto-generated by setup.sh)"
32+
setup_hook: setup.sh
2233

2334
features:
2435
- id: flowise-visual-workflow
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
# Flowise — generate required credentials if not already set
3+
# Usage: setup.sh INSTALL_DIR GPU_BACKEND
4+
5+
set -eu
6+
7+
ENV_FILE="${1:-.}/.env"
8+
9+
append_if_missing() {
10+
key="$1"
11+
value="$2"
12+
if [ -f "$ENV_FILE" ] && grep -q "^${key}=" "$ENV_FILE" 2>/dev/null; then
13+
return 0
14+
fi
15+
echo "${key}=${value}" >> "$ENV_FILE"
16+
}
17+
18+
append_if_missing "FLOWISE_USERNAME" "admin"
19+
append_if_missing "FLOWISE_PASSWORD" "$(openssl rand -hex 16)"

0 commit comments

Comments
 (0)