-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathdeamon.ini
79 lines (75 loc) · 1.88 KB
/
deamon.ini
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
[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 logs/celery_worker.pid
# stdout_logfile=/var/log/celeryd.log
# stderr_logfile=/var/log/celeryd.log
loglevel=info
redirect_stderr=true
redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600
[program:devops_celery_beat]
directory=/devops
;environment=PYTHONOPTIMIZE="1"
command=celery -A devops beat -l info --pidfile logs/celery_beat.pid
# stdout_logfile=/var/log/celeryd.log
# stderr_logfile=/var/log/celeryd.log
loglevel=info
redirect_stderr=true
redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600
[program:devops_sshd]
directory=/devops
command=python manage.py sshd
# stdout_logfile=/var/log/sshd.log
# stderr_logfile=/var/log/sshd.log
loglevel=info
redirect_stderr=true
redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600
[program:devops_daphne]
directory=/devops
command=daphne -b 0.0.0.0 -p 8001 devops.asgi:application
# stdout_logfile=/var/log/devops.log
# stderr_logfile=/var/log/devops.log
loglevel=info
redirect_stderr=true
redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600
[program:devops_gunicorn]
directory=/devops
command=gunicorn -c gunicorn.py devops.wsgi:application
# stdout_logfile=/var/log/devops.log
# stderr_logfile=/var/log/devops.log
loglevel=info
redirect_stderr=true
redirect_stdout=true
user=root
stopsignal=INT
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600