mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 14:23:08 +00:00
Enhance Weaviate configuration in docker-compose and secret generation script
- Added Weaviate username and password hash environment variables to docker-compose.yml for improved security and configuration. - Updated 03_generate_secrets.sh to better handle existing environment variables and ensure proper initialization of the .env file.
This commit is contained in:
@@ -192,6 +192,8 @@ services:
|
||||
- SEARXNG_HOSTNAME=${SEARXNG_HOSTNAME}
|
||||
- LANGFUSE_HOSTNAME=${LANGFUSE_HOSTNAME}
|
||||
- WEAVIATE_HOSTNAME=${WEAVIATE_HOSTNAME}
|
||||
- WEAVIATE_USERNAME=${WEAVIATE_USERNAME}
|
||||
- WEAVIATE_PASSWORD_HASH=${WEAVIATE_PASSWORD_HASH}
|
||||
- NEO4J_HOSTNAME=${NEO4J_HOSTNAME}
|
||||
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL:-internal}
|
||||
- PROMETHEUS_HOSTNAME=${PROMETHEUS_HOSTNAME}
|
||||
|
||||
@@ -50,12 +50,14 @@ declare -A VARS_TO_GENERATE=(
|
||||
["NEO4J_AUTH_PASSWORD"]="password:32" # Added Neo4j password
|
||||
)
|
||||
|
||||
# Check if .env file already exists
|
||||
# Initialize existing_env_vars and attempt to read .env if it exists
|
||||
log_info "Initializing environment configuration..."
|
||||
declare -A existing_env_vars
|
||||
|
||||
if [ -f "$OUTPUT_FILE" ]; then
|
||||
log_info "$OUTPUT_FILE already exists. Reading existing values and will only fill missing ones."
|
||||
declare -A existing_env_vars # Declare here if only used after this block
|
||||
log_info "Found existing $OUTPUT_FILE. Reading its values to use as defaults and preserve current settings."
|
||||
while IFS= read -r line || [[ -n "$line" ]]; do
|
||||
if [[ -n "$line" && ! "$line" =~ ^\\s*# && "$line" == *"="* ]]; then
|
||||
if [[ -n "$line" && ! "$line" =~ ^\s*# && "$line" == *"="* ]]; then
|
||||
varName=$(echo "$line" | cut -d'=' -f1 | xargs)
|
||||
varValue=$(echo "$line" | cut -d'=' -f2-)
|
||||
# Repeatedly unquote "value" or 'value' to get the bare value
|
||||
@@ -75,9 +77,6 @@ if [ -f "$OUTPUT_FILE" ]; then
|
||||
existing_env_vars["$varName"]="$varValue"
|
||||
fi
|
||||
done < "$OUTPUT_FILE"
|
||||
else
|
||||
log_info "No existing $OUTPUT_FILE found. Will generate a new one."
|
||||
declare -A existing_env_vars # Ensure it's declared even if file doesn't exist
|
||||
fi
|
||||
|
||||
# Install Caddy
|
||||
|
||||
Reference in New Issue
Block a user