| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- [supervisord]
- nodaemon=true
- logfile=/dev/null
- logfile_maxbytes=0
- pidfile=/tmp/supervisord.pid
- # socket 服务:固定 /var/run/supervisor.sock,与 Debian supervisorctl 默认路径一致
- # 修复:此前缺失该段,supervisord 实际 socket 与 supervisorctl 默认路径不符,docker exec supervisorctl status 报 no such file
- #
- # Socket server: fixed at /var/run/supervisor.sock, matching the Debian supervisorctl default
- # Fix: previously missing, the actual socket did not match supervisorctl's default, so docker exec supervisorctl status failed
- [unix_http_server]
- file=/var/run/supervisor.sock
- chmod=0700
- # RPC 接口:supervisorctl 的 status/tail/stop 等命令依赖该命名空间注册
- # 修复:此前缺失该段,supervisorctl status 报 "did not recognize the supervisor namespace commands"
- #
- # RPC interface: supervisorctl commands (status/tail/stop) require this namespace registration
- # Fix: previously missing, supervisorctl status failed with "did not recognize the supervisor namespace commands"
- [rpcinterface:supervisor]
- supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
- [supervisorctl]
- serverurl=unix:///var/run/supervisor.sock
- # dsh Web 客户端
- # 仅绑定容器内 loopback,不对外暴露
- # 注意:不传 --trusted-host(该 CLI 链路在 rc.6 不可靠),trustedHosts 走 cordis.patch.yml
- # --no-open:dsh 0.1.2-rc.1 默认尝试调系统命令打开浏览器,容器内无浏览器且无意义;
- # 也会污染 stdout(多一行 `opening the default browser; pass --no-open to disable`)。
- # 0.1.1-rc.2 也有该 flag,向后兼容
- #
- # dsh Web client
- # Binds only to the in-container loopback, never exposed externally
- # Note: --trusted-host is not passed (unreliable in rc.6); trustedHosts goes through cordis.patch.yml
- # --no-open: dsh 0.1.2-rc.1's web mode tries to invoke the system default browser on startup;
- # useless inside a headless container, and the error message clutters stdout
- # (`opening the default browser; pass --no-open to disable`). The flag also exists in 0.1.1-rc.2.
- [program:dsh]
- # dsh 输出经 tee 同时落到 /dev/stdout(docker logs 可见)和 /home/node/.dsh/web-server.log
- # (让 entrypoint 后台进程可以从中提取 0.1.2-rc.1 启动时打印的 `?token=XXX`)。
- # 直接在 command 里 tee 比 supervisord 的 stdout_logfile 灵活——后者要么走 /dev/stdout 要么走
- # 文件,二选一;用 shell 包装可以同时保留两条管道
- #
- # dsh output is teed to /dev/stdout (docker logs) and to /home/node/.dsh/web-server.log
- # (so the entrypoint can grep the 0.1.2-rc.1 one-time `?token=XXX`). Tee in command
- # rather than stdout_logfile because the latter is exclusive: /dev/stdout OR a file, not both.
- # The shell wrapper costs a subshell but keeps both pipelines intact.
- command=/bin/sh -c "exec /usr/local/bin/dsh --profile web --port 3080 --no-open 2>&1 | tee -a /home/node/.dsh/web-server.log"
- # x-cmd 工具经 entrypoint 软链进 /usr/local/bin(agent bash 的 PATH 白名单固定,接入方式见 entrypoint x-cmd 段)
- #
- # x-cmd tools are symlinked into /usr/local/bin by the entrypoint (the agent bash PATH whitelist is fixed; see the entrypoint's x-cmd section)
- user=node
- environment=HOME="/home/node"
- stdout_logfile=/dev/stdout
- stdout_logfile_maxbytes=0
- stderr_logfile=/dev/stderr
- stderr_logfile_maxbytes=0
- autorestart=true
- startsecs=3
- stopwaitsecs=30
- # Caddy basic auth 反代
- #
- # Caddy basic auth reverse proxy
- [program:caddy]
- command=/usr/bin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
- # x-cmd 工具经 entrypoint 软链进 /usr/local/bin(agent bash 的 PATH 白名单固定,接入方式见 entrypoint x-cmd 段)
- #
- # x-cmd tools are symlinked into /usr/local/bin by the entrypoint (the agent bash PATH whitelist is fixed; see the entrypoint's x-cmd section)
- user=node
- environment=HOME="/home/node",XDG_DATA_HOME="/home/node/.local/share"
- stdout_logfile=/dev/stdout
- stdout_logfile_maxbytes=0
- stderr_logfile=/dev/stderr
- stderr_logfile_maxbytes=0
- autorestart=true
- startsecs=2
- stopwaitsecs=10
|