mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 22:33:11 +00:00
Add Docling service configuration and credentials
- Introduced Docling hostname and credentials in .env.example for environment setup. - Updated Caddyfile to include reverse proxy configuration for the Docling service. - Added Docling service definition in docker-compose.yml with necessary environment variables and health checks. - Enhanced README.md to document Docling integration and access details. - Updated scripts to generate Docling credentials and include them in the final report for user visibility.
This commit is contained in:
@@ -66,6 +66,8 @@ declare -A VARS_TO_GENERATE=(
|
||||
# LightRAG credentials
|
||||
["LIGHTRAG_PASSWORD"]="password:32"
|
||||
["LIGHTRAG_API_KEY"]="secret:48"
|
||||
# Docling credentials
|
||||
["DOCLING_PASSWORD"]="password:32"
|
||||
)
|
||||
|
||||
# Initialize existing_env_vars and attempt to read .env if it exists
|
||||
@@ -274,6 +276,7 @@ generated_values["LT_USERNAME"]="$USER_EMAIL" # Set LibreTranslate username for
|
||||
generated_values["LIGHTRAG_USERNAME"]="$USER_EMAIL" # Set LightRAG username for built-in auth
|
||||
generated_values["WAHA_DASHBOARD_USERNAME"]="$USER_EMAIL" # WAHA dashboard username default
|
||||
generated_values["WHATSAPP_SWAGGER_USERNAME"]="$USER_EMAIL" # WAHA swagger username default
|
||||
generated_values["DOCLING_USERNAME"]="$USER_EMAIL" # Set Docling username for Caddy
|
||||
|
||||
|
||||
# Create a temporary file for processing
|
||||
@@ -297,6 +300,7 @@ found_vars["NEO4J_AUTH_USERNAME"]=0
|
||||
found_vars["COMFYUI_USERNAME"]=0
|
||||
found_vars["RAGAPP_USERNAME"]=0
|
||||
found_vars["PADDLEOCR_USERNAME"]=0
|
||||
found_vars["DOCLING_USERNAME"]=0
|
||||
found_vars["LT_USERNAME"]=0
|
||||
found_vars["LIGHTRAG_USERNAME"]=0
|
||||
found_vars["WAHA_DASHBOARD_USERNAME"]=0
|
||||
@@ -429,7 +433,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" "RAGAPP_USERNAME" "PADDLEOCR_USERNAME" "LT_USERNAME" "LIGHTRAG_USERNAME" "WAHA_DASHBOARD_USERNAME" "WHATSAPP_SWAGGER_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" "PADDLEOCR_USERNAME" "LT_USERNAME" "LIGHTRAG_USERNAME" "WAHA_DASHBOARD_USERNAME" "WHATSAPP_SWAGGER_USERNAME" "DOCLING_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
|
||||
@@ -607,6 +611,18 @@ if [[ -z "$FINAL_LT_HASH" && -n "$LT_PLAIN_PASS" ]]; then
|
||||
fi
|
||||
_update_or_add_env_var "LT_PASSWORD_HASH" "$FINAL_LT_HASH"
|
||||
|
||||
# --- DOCLING ---
|
||||
DOCLING_PLAIN_PASS="${generated_values["DOCLING_PASSWORD"]}"
|
||||
FINAL_DOCLING_HASH="${generated_values[DOCLING_PASSWORD_HASH]}"
|
||||
if [[ -z "$FINAL_DOCLING_HASH" && -n "$DOCLING_PLAIN_PASS" ]]; then
|
||||
NEW_HASH=$(_generate_and_get_hash "$DOCLING_PLAIN_PASS")
|
||||
if [[ -n "$NEW_HASH" ]]; then
|
||||
FINAL_DOCLING_HASH="$NEW_HASH"
|
||||
generated_values["DOCLING_PASSWORD_HASH"]="$NEW_HASH"
|
||||
fi
|
||||
fi
|
||||
_update_or_add_env_var "DOCLING_PASSWORD_HASH" "$FINAL_DOCLING_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.
|
||||
echo ".env file generated successfully in the project root ($OUTPUT_FILE)."
|
||||
|
||||
@@ -53,6 +53,7 @@ base_services_data=(
|
||||
"cloudflare-tunnel" "Cloudflare Tunnel (Zero-Trust Secure Access)"
|
||||
"comfyui" "ComfyUI (Node-based Stable Diffusion UI)"
|
||||
"crawl4ai" "Crawl4ai (Web Crawler for AI)"
|
||||
"docling" "Docling (Universal Document Converter to Markdown/JSON)"
|
||||
"dify" "Dify (AI Application Development Platform with LLMOps)"
|
||||
"flowise" "Flowise (AI Agent Builder)"
|
||||
"gotenberg" "Gotenberg (Document Conversion API)"
|
||||
|
||||
@@ -221,6 +221,31 @@ if is_profile_active "crawl4ai"; then
|
||||
echo "(Note: Not exposed externally via Caddy by default)"
|
||||
fi
|
||||
|
||||
if is_profile_active "docling"; then
|
||||
echo
|
||||
echo "================================= Docling ============================="
|
||||
echo
|
||||
echo "Host: ${DOCLING_HOSTNAME:-<hostname_not_set>}"
|
||||
echo "User: ${DOCLING_USERNAME:-<not_set_in_env>}"
|
||||
echo "Password: ${DOCLING_PASSWORD:-<not_set_in_env>}"
|
||||
echo "API (external via Caddy): https://${DOCLING_HOSTNAME:-<hostname_not_set>}"
|
||||
echo "API (internal): http://docling:5001"
|
||||
echo ""
|
||||
echo "Web UI: https://${DOCLING_HOSTNAME:-<hostname_not_set>}/ui"
|
||||
echo "API Docs: https://${DOCLING_HOSTNAME:-<hostname_not_set>}/docs"
|
||||
echo ""
|
||||
echo "Configuration:"
|
||||
echo " Docker Image: ${DOCLING_IMAGE:-ghcr.io/docling-project/docling-serve:cpu}"
|
||||
echo ""
|
||||
echo "Main API Endpoint:"
|
||||
echo " POST /v1/convert/source"
|
||||
echo " Body: {\"sources\": [{\"kind\": \"http\", \"url\": \"https://example.com/doc.pdf\"}]}"
|
||||
echo ""
|
||||
echo "Supported formats: PDF, DOCX, PPTX, XLSX, HTML, images"
|
||||
echo "Output formats: Markdown, JSON, HTML"
|
||||
echo "GitHub: https://github.com/docling-project/docling-serve"
|
||||
fi
|
||||
|
||||
if is_profile_active "gotenberg"; then
|
||||
echo
|
||||
echo "================================= Gotenberg ============================"
|
||||
|
||||
Reference in New Issue
Block a user