- Multi-stage: Node.js build + Python sidecar + supervisord runtime - Stage 1: pnpm workspace build for Fastify TS service - Stage 2: pip install langextract + FastAPI deps - Stage 3: node:22-alpine + python3 + supervisord - supervisord manages both Fastify (4005) and uvicorn (4006)
28 lines
613 B
Plaintext
28 lines
613 B
Plaintext
[supervisord]
|
|
nodaemon=true
|
|
logfile=/dev/stdout
|
|
logfile_maxbytes=0
|
|
loglevel=info
|
|
|
|
[program:fastify]
|
|
command=node dist/server.js
|
|
directory=/app
|
|
autostart=true
|
|
autorestart=true
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|
|
environment=NODE_ENV="production",PORT="4005"
|
|
|
|
[program:python-sidecar]
|
|
command=uvicorn src.app:app --host 0.0.0.0 --port 4006 --workers 1
|
|
directory=/app/python
|
|
autostart=true
|
|
autorestart=true
|
|
stdout_logfile=/dev/stdout
|
|
stdout_logfile_maxbytes=0
|
|
stderr_logfile=/dev/stderr
|
|
stderr_logfile_maxbytes=0
|
|
environment=PYTHONUNBUFFERED="1"
|