supervisord.conf 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. [supervisord]
  2. nodaemon=true
  3. logfile=/dev/null
  4. logfile_maxbytes=0
  5. pidfile=/tmp/supervisord.pid
  6. # socket 服务:固定 /var/run/supervisor.sock,与 Debian supervisorctl 默认路径一致
  7. # 修复:此前缺失该段,supervisord 实际 socket 与 supervisorctl 默认路径不符,docker exec supervisorctl status 报 no such file
  8. #
  9. # Socket server: fixed at /var/run/supervisor.sock, matching the Debian supervisorctl default
  10. # Fix: previously missing, the actual socket did not match supervisorctl's default, so docker exec supervisorctl status failed
  11. [unix_http_server]
  12. file=/var/run/supervisor.sock
  13. chmod=0700
  14. # RPC 接口:supervisorctl 的 status/tail/stop 等命令依赖该命名空间注册
  15. # 修复:此前缺失该段,supervisorctl status 报 "did not recognize the supervisor namespace commands"
  16. #
  17. # RPC interface: supervisorctl commands (status/tail/stop) require this namespace registration
  18. # Fix: previously missing, supervisorctl status failed with "did not recognize the supervisor namespace commands"
  19. [rpcinterface:supervisor]
  20. supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
  21. [supervisorctl]
  22. serverurl=unix:///var/run/supervisor.sock
  23. # dsh Web 客户端
  24. # 仅绑定容器内 loopback,不对外暴露
  25. # 注意:不传 --trusted-host(该 CLI 链路在 rc.6 不可靠),trustedHosts 走 cordis.patch.yml
  26. # --no-open:dsh 0.1.2-rc.1 默认尝试调系统命令打开浏览器,容器内无浏览器且无意义;
  27. # 也会污染 stdout(多一行 `opening the default browser; pass --no-open to disable`)。
  28. # 0.1.1-rc.2 也有该 flag,向后兼容
  29. #
  30. # dsh Web client
  31. # Binds only to the in-container loopback, never exposed externally
  32. # Note: --trusted-host is not passed (unreliable in rc.6); trustedHosts goes through cordis.patch.yml
  33. # --no-open: dsh 0.1.2-rc.1's web mode tries to invoke the system default browser on startup;
  34. # useless inside a headless container, and the error message clutters stdout
  35. # (`opening the default browser; pass --no-open to disable`). The flag also exists in 0.1.1-rc.2.
  36. [program:dsh]
  37. # dsh 输出经 tee 同时落到 /dev/stdout(docker logs 可见)和 /home/node/.dsh/web-server.log
  38. # (让 entrypoint 后台进程可以从中提取 0.1.2-rc.1 启动时打印的 `?token=XXX`)。
  39. # 直接在 command 里 tee 比 supervisord 的 stdout_logfile 灵活——后者要么走 /dev/stdout 要么走
  40. # 文件,二选一;用 shell 包装可以同时保留两条管道
  41. #
  42. # dsh output is teed to /dev/stdout (docker logs) and to /home/node/.dsh/web-server.log
  43. # (so the entrypoint can grep the 0.1.2-rc.1 one-time `?token=XXX`). Tee in command
  44. # rather than stdout_logfile because the latter is exclusive: /dev/stdout OR a file, not both.
  45. # The shell wrapper costs a subshell but keeps both pipelines intact.
  46. 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"
  47. # x-cmd 工具经 entrypoint 软链进 /usr/local/bin(agent bash 的 PATH 白名单固定,接入方式见 entrypoint x-cmd 段)
  48. #
  49. # 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)
  50. user=node
  51. environment=HOME="/home/node"
  52. stdout_logfile=/dev/stdout
  53. stdout_logfile_maxbytes=0
  54. stderr_logfile=/dev/stderr
  55. stderr_logfile_maxbytes=0
  56. autorestart=true
  57. startsecs=3
  58. stopwaitsecs=30
  59. # Caddy basic auth 反代
  60. #
  61. # Caddy basic auth reverse proxy
  62. [program:caddy]
  63. command=/usr/bin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile
  64. # x-cmd 工具经 entrypoint 软链进 /usr/local/bin(agent bash 的 PATH 白名单固定,接入方式见 entrypoint x-cmd 段)
  65. #
  66. # 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)
  67. user=node
  68. environment=HOME="/home/node",XDG_DATA_HOME="/home/node/.local/share"
  69. stdout_logfile=/dev/stdout
  70. stdout_logfile_maxbytes=0
  71. stderr_logfile=/dev/stderr
  72. stderr_logfile_maxbytes=0
  73. autorestart=true
  74. startsecs=2
  75. stopwaitsecs=10