1
0
mirror of https://github.com/pooneyy/1Panel-Appstore.git synced 2026-03-17 22:21:03 +08:00
1Panel-Appstore/apps/dify/1.9.2/nginx/docker-entrypoint.sh
pooneyy 2d7c9d3671
feat(dify): add comprehensive environment configuration template
- introduce .env.example with 1140+ configuration options for API service and worker
- enhance configuration coverage for database, redis, vector stores, and storage providers
- add new datasource configuration options for website readers (jinareader, firecrawl, watercrawl)
- expand vector store support with additional providers including matrixone, opengauss, tablestore, and vastbase
- improve workflow configuration with enhanced storage options and security settings

📝 docs(dify): update configuration templates and documentation

- enhance nginx configuration with improved variable substitution and MCP proxy support
- update squid proxy configuration with additional security rules and increased buffer size
- improve oracle database initialization scripts with world_lexer preference
- update tidb configuration files and docker-compose for version compatibility

♻️ refactor(structure): reorganize project directory layout

- move configuration files from conf/ subdirectory to app root for better clarity
- rename envs/dify.env to dify.env for consistency
- update file paths in docker-compose.yml to reflect new directory structure
- remove redundant configuration files and consolidate volumes

🔧 chore(dify): simplify form configuration and remove obsolete scripts

- remove database and vector store port configurations from data.yml form fields
- eliminate obsolete initialization and upgrade scripts
- add new pgvector docker-entrypoint.sh script for pg_bigm installation support
- update docker-compose.yml with enhanced environment variables and service configurations
2025-11-10 16:06:50 +08:00

43 lines
1.8 KiB
Bash

#!/bin/bash
HTTPS_CONFIG=''
if [ "${NGINX_HTTPS_ENABLED}" = "true" ]; then
# Check if the certificate and key files for the specified domain exist
if [ -n "${CERTBOT_DOMAIN}" ] && \
[ -f "/etc/letsencrypt/live/${CERTBOT_DOMAIN}/${NGINX_SSL_CERT_FILENAME}" ] && \
[ -f "/etc/letsencrypt/live/${CERTBOT_DOMAIN}/${NGINX_SSL_CERT_KEY_FILENAME}" ]; then
SSL_CERTIFICATE_PATH="/etc/letsencrypt/live/${CERTBOT_DOMAIN}/${NGINX_SSL_CERT_FILENAME}"
SSL_CERTIFICATE_KEY_PATH="/etc/letsencrypt/live/${CERTBOT_DOMAIN}/${NGINX_SSL_CERT_KEY_FILENAME}"
else
SSL_CERTIFICATE_PATH="/etc/ssl/${NGINX_SSL_CERT_FILENAME}"
SSL_CERTIFICATE_KEY_PATH="/etc/ssl/${NGINX_SSL_CERT_KEY_FILENAME}"
fi
export SSL_CERTIFICATE_PATH
export SSL_CERTIFICATE_KEY_PATH
# set the HTTPS_CONFIG environment variable to the content of the https.conf.template
HTTPS_CONFIG=$(envsubst < /etc/nginx/https.conf.template)
export HTTPS_CONFIG
# Substitute the HTTPS_CONFIG in the default.conf.template with content from https.conf.template
envsubst '${HTTPS_CONFIG}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
fi
export HTTPS_CONFIG
if [ "${NGINX_ENABLE_CERTBOT_CHALLENGE}" = "true" ]; then
ACME_CHALLENGE_LOCATION='location /.well-known/acme-challenge/ { root /var/www/html; }'
else
ACME_CHALLENGE_LOCATION=''
fi
export ACME_CHALLENGE_LOCATION
env_vars=$(printenv | cut -d= -f1 | sed 's/^/$/g' | paste -sd, -)
envsubst "$env_vars" < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
envsubst "$env_vars" < /etc/nginx/proxy.conf.template > /etc/nginx/proxy.conf
envsubst "$env_vars" < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
# Start Nginx using the default entrypoint
exec nginx -g 'daemon off;'