Created
January 15, 2018 02:17
-
-
Save ResolveWang/337beb6ecdf24af5019d952c94d6508b to your computer and use it in GitHub Desktop.
supervisord.conf with python virutalenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
[supervisord] | |
logfile=/home/aaa/project/log/supervisord.log ; (main log file;default $CWD/supervisord.log) | |
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB) | |
logfile_backups=10 ; (num of main logfile rotation backups;default 10) | |
loglevel=info ; (log level;default info; others: debug,warn,trace) | |
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | |
nodaemon=false ; (start in foreground if true;default false) | |
minfds=1024 ; (min. avail startup file descriptors;default 1024) | |
minprocs=200 ; (min. avail process descriptors;default 200) | |
[rpcinterface:supervisor] | |
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | |
[supervisorctl] | |
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket | |
[program:admin] | |
command=/bin/bash -c 'source "$0" && exec "$@"' /home/aaa/project/myblog/.env/bin/activate gunicorn -c myadmin.conf myadmin:app ; the program (relative uses PATH, can take args) | |
directory=/home/aaa/project/myblog ; directory to cwd to before exec (def no cwd) | |
priority=30 ; the relative start priority (default 999) | |
autostart=true ; start at supervisord start (default: true) | |
startsecs=1 ; # of secs prog must stay up to be running (def. 1) | |
startretries=3 ; max # of serial start failures when starting (default 3) | |
autorestart=true ; when to restart if exited after running (def: unexpected) | |
redirect_stderr=true ; redirect proc stderr to stdout (default false) | |
[program:home] | |
command=/bin/bash -c 'source "$0" && exec "$@"' /home/aaa/project/myblog/.env/bin/activate gunicorn -c home.conf -k gevent home:app | |
directory=/home/aaa/project/myblog | |
priority=20 | |
autostart=true | |
startsecs=1 | |
startretries=3 | |
autorestart=true | |
redirect_stderr=true | |
stdout_logfile=/home/aaa/project/log/home.log | |
stderr_logfile=/home/aaa/project/log/home.err | |
[program:nginx] | |
command=/usr/sbin/nginx -g "daemon off;" | |
user=root | |
priority=1 | |
"supervisord.conf" 97L, 3747C 1,1 Top |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment