[supervisord] nodaemon=true logfile=/var/log/supervisor/supervisord.log pidfile=/run/supervisord.pid childlogdir=/var/log/supervisor [program:nginx] command=nginx -g "daemon off;" autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:searxng] # 配置优先级:data 卷里的 /app/data/searxng-settings.yml 存在则用它, # 否则用镜像内置的 /etc/searxng/settings.yml。 # # 这样代理(outgoing.proxies)这类**部署相关**配置就落在数据卷里, # 重建容器不会再丢;同时也免去“改配置必须重建镜像”。 # 注意:不能用 supervisord 的 environment= 做条件判断,它不支持逻辑, # 所以这里用 sh -c 包一层(/bin/sh 是 dash,语法保持最小)。 command=/bin/sh -c 'if [ -f /app/data/searxng-settings.yml ]; then export SEARXNG_SETTINGS_PATH=/app/data/searxng-settings.yml; fi; exec /app/searxng-venv/bin/python -m searx.webapp' # 不设 environment:继承 docker run -e SEARXNG_BASE_URL 等父进程环境变量 autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:history-server] command=/usr/local/bin/history-server autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:admin-server] command=/usr/local/bin/admin-server autostart=true autorestart=true stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:cert-agent] # 容器内自动续签 HomeDash **自己**的证书(不接管其它站点)。 # 未配置 CERT_DNS_API/CERT_DNS_CRED 时脚本会安静退出,不影响入口, # 证书仍由外部链路(acme.sh → 同步)提供。 command=/usr/local/bin/cert-agent autostart=true # autorestart=false:脚本自己内含 sleep 循环,异常退出会停止续签, # 但重启它也没用(凭据问题会再退),所以不自动重启以免刷日志。 autorestart=false startsecs=10 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0