mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 22:33:11 +00:00
Add RAGApp integration into configuration
- Updated .env.example to include RAGAPP_HOSTNAME, RAGAPP_USERNAME, and RAGAPP_PASSWORD for basic authentication. - Modified Caddyfile to implement basic authentication for the RAGApp reverse proxy. - Enhanced docker-compose.yml to add a new RAGApp service with necessary environment variables. - Updated scripts to generate RAGApp credentials and include them in the setup wizard and final report. - Documented RAGApp details in the final report for user visibility.
This commit is contained in:
@@ -52,6 +52,7 @@ declare -A VARS_TO_GENERATE=(
|
||||
# Dify environment variables
|
||||
["DIFY_SECRET_KEY"]="secret:64" # Dify application secret key (maps to SECRET_KEY in Dify)
|
||||
["COMFYUI_PASSWORD"]="password:32" # Added ComfyUI basic auth password
|
||||
["RAGAPP_PASSWORD"]="password:32" # Added RAGApp basic auth password
|
||||
)
|
||||
|
||||
# Initialize existing_env_vars and attempt to read .env if it exists
|
||||
@@ -370,6 +371,7 @@ generated_values["LANGFUSE_INIT_USER_EMAIL"]="$USER_EMAIL"
|
||||
generated_values["N8N_WORKER_COUNT"]="$N8N_WORKER_COUNT"
|
||||
generated_values["WEAVIATE_USERNAME"]="$USER_EMAIL" # Set Weaviate username for Caddy
|
||||
generated_values["COMFYUI_USERNAME"]="$USER_EMAIL" # Set ComfyUI username for Caddy
|
||||
generated_values["RAGAPP_USERNAME"]="$USER_EMAIL" # Set RAGApp username for Caddy
|
||||
|
||||
if [[ -n "$OPENAI_API_KEY" ]]; then
|
||||
generated_values["OPENAI_API_KEY"]="$OPENAI_API_KEY"
|
||||
@@ -394,6 +396,7 @@ found_vars["N8N_WORKER_COUNT"]=0
|
||||
found_vars["WEAVIATE_USERNAME"]=0
|
||||
found_vars["NEO4J_AUTH_USERNAME"]=0
|
||||
found_vars["COMFYUI_USERNAME"]=0
|
||||
found_vars["RAGAPP_USERNAME"]=0
|
||||
|
||||
# Read template, substitute domain, generate initial values
|
||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||
@@ -440,7 +443,7 @@ while IFS= read -r line || [[ -n "$line" ]]; do
|
||||
# This 'else' block is for lines from template not covered by existing values or VARS_TO_GENERATE.
|
||||
# Check if it is one of the user input vars - these are handled by found_vars later if not in template.
|
||||
is_user_input_var=0 # Reset for each line
|
||||
user_input_vars=("FLOWISE_USERNAME" "DASHBOARD_USERNAME" "LETSENCRYPT_EMAIL" "RUN_N8N_IMPORT" "PROMETHEUS_USERNAME" "SEARXNG_USERNAME" "OPENAI_API_KEY" "LANGFUSE_INIT_USER_EMAIL" "N8N_WORKER_COUNT" "WEAVIATE_USERNAME" "NEO4J_AUTH_USERNAME" "COMFYUI_USERNAME")
|
||||
user_input_vars=("FLOWISE_USERNAME" "DASHBOARD_USERNAME" "LETSENCRYPT_EMAIL" "RUN_N8N_IMPORT" "PROMETHEUS_USERNAME" "SEARXNG_USERNAME" "OPENAI_API_KEY" "LANGFUSE_INIT_USER_EMAIL" "N8N_WORKER_COUNT" "WEAVIATE_USERNAME" "NEO4J_AUTH_USERNAME" "COMFYUI_USERNAME" "RAGAPP_USERNAME")
|
||||
for uivar in "${user_input_vars[@]}"; do
|
||||
if [[ "$varName" == "$uivar" ]]; then
|
||||
is_user_input_var=1
|
||||
@@ -522,7 +525,7 @@ if [[ -z "${generated_values[SERVICE_ROLE_KEY]}" ]]; then
|
||||
fi
|
||||
|
||||
# Add any custom variables that weren't found in the template
|
||||
for var in "FLOWISE_USERNAME" "DASHBOARD_USERNAME" "LETSENCRYPT_EMAIL" "RUN_N8N_IMPORT" "OPENAI_API_KEY" "PROMETHEUS_USERNAME" "SEARXNG_USERNAME" "LANGFUSE_INIT_USER_EMAIL" "N8N_WORKER_COUNT" "WEAVIATE_USERNAME" "NEO4J_AUTH_USERNAME" "COMFYUI_USERNAME"; do
|
||||
for var in "FLOWISE_USERNAME" "DASHBOARD_USERNAME" "LETSENCRYPT_EMAIL" "RUN_N8N_IMPORT" "OPENAI_API_KEY" "PROMETHEUS_USERNAME" "SEARXNG_USERNAME" "LANGFUSE_INIT_USER_EMAIL" "N8N_WORKER_COUNT" "WEAVIATE_USERNAME" "NEO4J_AUTH_USERNAME" "COMFYUI_USERNAME" "RAGAPP_USERNAME"; do
|
||||
if [[ ${found_vars["$var"]} -eq 0 && -v generated_values["$var"] ]]; then
|
||||
# Before appending, check if it's already in TMP_ENV_FILE to avoid duplicates
|
||||
if ! grep -q -E "^${var}=" "$TMP_ENV_FILE"; then
|
||||
@@ -645,6 +648,18 @@ if [[ -z "$FINAL_COMFYUI_HASH" && -n "$COMFYUI_PLAIN_PASS" ]]; then
|
||||
fi
|
||||
_update_or_add_env_var "COMFYUI_PASSWORD_HASH" "$FINAL_COMFYUI_HASH"
|
||||
|
||||
# --- RAGAPP ---
|
||||
RAGAPP_PLAIN_PASS="${generated_values["RAGAPP_PASSWORD"]}"
|
||||
FINAL_RAGAPP_HASH="${generated_values[RAGAPP_PASSWORD_HASH]}"
|
||||
if [[ -z "$FINAL_RAGAPP_HASH" && -n "$RAGAPP_PLAIN_PASS" ]]; then
|
||||
NEW_HASH=$(_generate_and_get_hash "$RAGAPP_PLAIN_PASS")
|
||||
if [[ -n "$NEW_HASH" ]]; then
|
||||
FINAL_RAGAPP_HASH="$NEW_HASH"
|
||||
generated_values["RAGAPP_PASSWORD_HASH"]="$NEW_HASH"
|
||||
fi
|
||||
fi
|
||||
_update_or_add_env_var "RAGAPP_PASSWORD_HASH" "$FINAL_RAGAPP_HASH"
|
||||
|
||||
|
||||
if [ $? -eq 0 ]; then # This $? reflects the status of the last mv command from the last _update_or_add_env_var call.
|
||||
# For now, assuming if we reached here and mv was fine, primary operations were okay.
|
||||
|
||||
@@ -63,6 +63,7 @@ base_services_data=(
|
||||
"letta" "Letta (Agent Server & SDK)"
|
||||
"gotenberg" "Gotenberg (Document Conversion API)"
|
||||
"crawl4ai" "Crawl4ai (Web Crawler for AI)"
|
||||
"ragapp" "RAGApp (Open-source RAG UI + API)"
|
||||
"open-webui" "Open WebUI (ChatGPT-like Interface)"
|
||||
"searxng" "SearXNG (Private Metasearch Engine)"
|
||||
"ollama" "Ollama (Local LLM Runner - select hardware in next step)"
|
||||
|
||||
@@ -135,6 +135,17 @@ if is_profile_active "portainer"; then
|
||||
echo "(Note: On first login, Portainer will prompt to set up an admin user.)"
|
||||
fi
|
||||
|
||||
if is_profile_active "ragapp"; then
|
||||
echo
|
||||
echo "================================= RAGApp =============================="
|
||||
echo
|
||||
echo "Host: ${RAGAPP_HOSTNAME:-<hostname_not_set>}"
|
||||
echo "User: ${RAGAPP_USERNAME:-<not_set_in_env>}"
|
||||
echo "Password: ${RAGAPP_PASSWORD:-<not_set_in_env>}"
|
||||
echo "Admin: https://${RAGAPP_HOSTNAME:-<hostname_not_set>}/admin"
|
||||
echo "API Docs: https://${RAGAPP_HOSTNAME:-<hostname_not_set>}/docs"
|
||||
fi
|
||||
|
||||
if is_profile_active "comfyui"; then
|
||||
echo
|
||||
echo "================================= ComfyUI ============================="
|
||||
|
||||
Reference in New Issue
Block a user