mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-04-29 11:09:58 +00:00
Add PaddleOCR configuration and credentials to environment and Caddyfile
- Updated .env.example to include PaddleOCR credentials (username, password, password hash). - Modified Caddyfile to implement basic authentication for PaddleOCR using the new credentials. - Enhanced docker-compose.yml to pass PaddleOCR environment variables to the service. - Updated scripts to generate and manage PaddleOCR password securely. - Added PaddleOCR documentation link in README.md for user reference.
This commit is contained in:
@@ -53,6 +53,7 @@ declare -A VARS_TO_GENERATE=(
|
||||
["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
|
||||
["PADDLEOCR_PASSWORD"]="password:32" # Added PaddleOCR basic auth password
|
||||
)
|
||||
|
||||
# Initialize existing_env_vars and attempt to read .env if it exists
|
||||
@@ -649,6 +650,18 @@ if [[ -z "$FINAL_COMFYUI_HASH" && -n "$COMFYUI_PLAIN_PASS" ]]; then
|
||||
fi
|
||||
_update_or_add_env_var "COMFYUI_PASSWORD_HASH" "$FINAL_COMFYUI_HASH"
|
||||
|
||||
# --- PADDLEOCR ---
|
||||
PADDLEOCR_PLAIN_PASS="${generated_values["PADDLEOCR_PASSWORD"]}"
|
||||
FINAL_PADDLEOCR_HASH="${generated_values[PADDLEOCR_PASSWORD_HASH]}"
|
||||
if [[ -z "$FINAL_PADDLEOCR_HASH" && -n "$PADDLEOCR_PLAIN_PASS" ]]; then
|
||||
NEW_HASH=$(_generate_and_get_hash "$PADDLEOCR_PLAIN_PASS")
|
||||
if [[ -n "$NEW_HASH" ]]; then
|
||||
FINAL_PADDLEOCR_HASH="$NEW_HASH"
|
||||
generated_values["PADDLEOCR_PASSWORD_HASH"]="$NEW_HASH"
|
||||
fi
|
||||
fi
|
||||
_update_or_add_env_var "PADDLEOCR_PASSWORD_HASH" "$FINAL_PADDLEOCR_HASH"
|
||||
|
||||
# --- RAGAPP ---
|
||||
RAGAPP_PLAIN_PASS="${generated_values["RAGAPP_PASSWORD"]}"
|
||||
FINAL_RAGAPP_HASH="${generated_values[RAGAPP_PASSWORD_HASH]}"
|
||||
|
||||
@@ -200,8 +200,11 @@ if is_profile_active "paddleocr"; then
|
||||
echo "================================= PaddleOCR ==========================="
|
||||
echo
|
||||
echo "Host: ${PADDLEOCR_HOSTNAME:-<hostname_not_set>}"
|
||||
echo "User: ${PADDLEOCR_USERNAME:-<not_set_in_env>}"
|
||||
echo "Password: ${PADDLEOCR_PASSWORD:-<not_set_in_env>}"
|
||||
echo "API (external via Caddy): https://${PADDLEOCR_HOSTNAME:-<hostname_not_set>}"
|
||||
echo "API (internal): http://paddleocr:8080"
|
||||
echo "Docs: https://paddleocr.a2.fyi/docs"
|
||||
echo "Notes: PaddleX Basic Serving (CPU), pipeline=OCR"
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user