Files
Neclode 2358b0a05f fix(docker): launch mcp-server via node directly to avoid pnpm verify-deps crash
The Docker image's mcp-server process crashes on boot with
ERR_PNPM_WORKSPACE_PKG_NOT_FOUND (#314). supervisord starts it via
`pnpm start`, and pnpm 10 runs a dependency-sync check before the script.
From the isolated /app/mcp-server dir it tries to resolve
`@prompt-optimizer/core@workspace:*`, can't find the workspace sibling,
and aborts before node ever runs.

The built artifact is self-contained (deps bundled, NODE_PATH=/app), so the
pnpm wrapper is unnecessary. Call node directly, matching the `start` script:

  node -r ./preload-env.cjs dist/start.cjs --transport=http --port=3000

Verified: mcp-server reaches RUNNING state and serves /mcp on a fresh build
from develop.

Fixes #314
2026-06-18 23:34:54 -07:00

37 lines
879 B
Plaintext

[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
[program:nginx]
command=nginx -g "daemon off;"
autostart=true
autorestart=false
startretries=0
stderr_logfile=/var/log/supervisor/nginx.err.log
stdout_logfile=/var/log/supervisor/nginx.out.log
priority=100
[program:mcp-server]
command=node -r ./preload-env.cjs dist/start.cjs --transport=http --port=3000
directory=/app/mcp-server
autostart=true
autorestart=false
startretries=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
priority=200
environment=NODE_ENV=production,NODE_PATH=/app
[unix_http_server]
file=/var/run/supervisor.sock
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface