Skip to content

Commit 79affc9

Browse files
committed
fix(supervisor): add supervisorctl sock path
1 parent 465ca61 commit 79affc9

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

deploy/supervisord.conf

+11-2
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,25 @@ nodaemon=true
88
childlogdir=%(ENV_WORKDIR)s/data/log
99

1010
[inet_http_server]
11-
port=0.0.0.0:9005
11+
port=0.0.0.0:9001
12+
username=onl
13+
password=onl
1214

1315
[rpcinterface:supervisor]
1416
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
1517

18+
[unix_http_server]
19+
file=/tmp/supervisor.sock ; unix socket file
20+
1621
[supervisorctl]
17-
serverurl=http://0.0.0.0:9005
22+
serverurl=unix:///tmp/supervisor.sock ; connect to supervisord through unix socket
1823

1924
[program:redis]
2025
command=redis-server --port 6380
2126
directory=%(ENV_WORKDIR)s
2227
stdout_logfile=%(ENV_WORKDIR)s/data/log/redis.log
2328
stderr_logfile=%(ENV_WORKDIR)s/data/log/redis.log
29+
stdout_logfile_maxbytes = 10MB
2430
autostart=true
2531
autorestart=true
2632

@@ -29,6 +35,7 @@ command=gunicorn onl.wsgi --bind 0.0.0.0:7890 --workers %(ENV_MAX_WORKER_NUM)s -
2935
directory=%(ENV_WORKDIR)s
3036
stdout_logfile=%(ENV_WORKDIR)s/data/log/onl_backend.log
3137
stderr_logfile=%(ENV_WORKDIR)s/data/log/onl_backend.log
38+
stdout_logfile_maxbytes = 10MB
3239
autostart=true
3340
autorestart=true
3441
killasgroup=true
@@ -38,6 +45,7 @@ command=node build/dev-server.js
3845
directory=%(ENV_FRONTEND)s
3946
stdout_logfile=%(ENV_WORKDIR)s/data/log/onl_fe.log
4047
stderr_logfile=%(ENV_WORKDIR)s/data/log/onl_fe.log
48+
stdout_logfile_maxbytes = 10MB
4149
autostart=true
4250
autorestart=true
4351
startsecs=5
@@ -48,6 +56,7 @@ command=python3 manage.py rundramatiq --processes %(ENV_MAX_WORKER_NUM)s --threa
4856
directory=%(ENV_WORKDIR)s
4957
stdout_logfile=%(ENV_WORKDIR)s/data/log/dramatiq.log
5058
stderr_logfile=%(ENV_WORKDIR)s/data/log/dramatiq.log
59+
stdout_logfile_maxbytes = 10MB
5160
autostart=true
5261
autorestart=true
5362
killasgroup=true

manage

-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ function run_onl {
5858
function stop_onl {
5959
pkill -f "$supervisor_cmd"
6060
[[ $? -eq 0 ]] && echo "stop supervisord"
61-
docker container stop oj-redis-dev > /dev/null
62-
[[ $? -eq 0 ]] && echo "stop redis docker"
6361
}
6462

6563
case $cmd in

0 commit comments

Comments
 (0)