-
Notifications
You must be signed in to change notification settings - Fork 148
/
supervisord.conf
99 lines (95 loc) · 2.61 KB
/
supervisord.conf
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
[program:devops_celery_worker]
directory=/devops
;environment=PYTHONOPTIMIZE="1"
# -c worker进程数,默认 cpu 核数
# --max-tasks-per-child 每个worker执行了多少个任务就会被新的worker替代,
# 可以设置小点防止长时间运行Celery有可能发生内存泄露
command=celery -A devops worker -l info -c 5 --max-tasks-per-child 200 --prefetch-multiplier 10 --pidfile /tmp/%(program_name)s.pid
stdout_logfile=/tmp/%(program_name)s_stdout.log
stderr_logfile=/tmp/%(program_name)s_stderr.log
stdout_logfile_maxbytes=52428800
stderr_logfile_maxbytes=52428800
stdout_logfile_backups=1024
stderr_logfile_backups=1024
loglevel=info
#redirect_stderr=true
#redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=120
[program:devops_celery_beat]
directory=/devops
;environment=PYTHONOPTIMIZE="1"
command=celery -A devops beat -l info --pidfile /tmp/%(program_name)s.pid
stdout_logfile=/tmp/%(program_name)s_stdout.log
stderr_logfile=/tmp/%(program_name)s_stderr.log
stdout_logfile_maxbytes=52428800
stderr_logfile_maxbytes=52428800
stdout_logfile_backups=1024
stderr_logfile_backups=1024
loglevel=info
#redirect_stderr=true
#redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=120
[program:devops_sshd]
directory=/devops
command=/usr/local/bin/python manage.py sshd
stdout_logfile=/tmp/%(program_name)s_stdout.log
stderr_logfile=/tmp/%(program_name)s_stderr.log
stdout_logfile_maxbytes=52428800
stderr_logfile_maxbytes=52428800
stdout_logfile_backups=1024
stderr_logfile_backups=1024
loglevel=info
#redirect_stderr=true
#redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=120
[program:devops_daphne]
directory=/devops
command=daphne -b 0.0.0.0 -p 8001 devops.asgi:application
stdout_logfile=/tmp/%(program_name)s_stdout.log
stderr_logfile=/tmp/%(program_name)s_stderr.log
stdout_logfile_maxbytes=52428800
stderr_logfile_maxbytes=52428800
stdout_logfile_backups=1024
stderr_logfile_backups=1024
loglevel=info
#redirect_stderr=true
#redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=120
[program:devops_gunicorn]
directory=/devops
command=gunicorn -c gunicorn.py devops.wsgi:application
stdout_logfile=/tmp/%(program_name)s_stdout.log
stderr_logfile=/tmp/%(program_name)s_stderr.log
stdout_logfile_maxbytes=52428800
stderr_logfile_maxbytes=52428800
stdout_logfile_backups=1024
stderr_logfile_backups=1024
loglevel=info
#redirect_stderr=true
#redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=120