-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Expand file tree
/
Copy pathsupervisord.conf
More file actions
50 lines (46 loc) · 1.65 KB
/
Copy pathsupervisord.conf
File metadata and controls
50 lines (46 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Shared supervisord configuration for both Docker image variants.
# The single-container image appends supervisord.surrealdb.conf to this file
# at build time (see the `single` stage in the Dockerfile).
[supervisord]
nodaemon=true
logfile=/dev/stdout
logfile_maxbytes=0
pidfile=/tmp/supervisord.pid
[program:api]
command=uv run --no-sync uvicorn api.main:app --host %(ENV_API_HOST)s --port 5055
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autorestart=true
priority=10
autostart=true
startsecs=3
[program:worker]
; sh -c so the shell expands ${OPEN_NOTEBOOK_WORKER_MAX_TASKS:-5} (supervisord's
; own command= does not run through a shell). Falls back to 5 when unset.
command=sh -c "uv run --no-sync surreal-commands-worker --import-modules commands --max-tasks ${OPEN_NOTEBOOK_WORKER_MAX_TASKS:-5}"
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autorestart=true
priority=20
autostart=true
startsecs=3
[program:frontend]
; HOSTNAME must be forced here: container runtimes inject HOSTNAME=<container/pod
; hostname> at runtime (Podman pods override the image's ENV HOSTNAME=0.0.0.0),
; making Next.js bind to the wrong address (#994). Override with FRONTEND_BIND_HOST.
command=bash -c "/app/scripts/wait-for-api.sh && HOSTNAME=${FRONTEND_BIND_HOST:-0.0.0.0} node server.js"
directory=/app/frontend
environment=NODE_ENV="production",PORT="8502"
passenv=API_URL,NEXT_PUBLIC_API_URL,INTERNAL_API_URL
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
autorestart=true
priority=30
autostart=true
startsecs=10