Last active
February 19, 2019 14:05
-
-
Save stavxyz/13e6473c86657765fc1b to your computer and use it in GitHub Desktop.
supervisor - redis + mongo
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
master = true | |
#vv = true | |
port = 27017 | |
bind_ip = 0.0.0.0 | |
auth = false | |
noauth = true | |
jsonp = true | |
rest = true | |
fork = false | |
#upgrade = true | |
dbpath = ~/etc/mongo/db/ | |
directoryperdb = true | |
#logpath = ~/etc/log/mongo | |
#syslog = true |
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
; Note: shell expansion ("~" or "$HOME") is not supported. Environment | |
; variables can be expanded using this syntax: "%(ENV_HOME)s". | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
[supervisord] | |
directory=%(ENV_HOME)s/etc/supervisor ; | |
logfile=%(ENV_HOME)s/etc/supervisor/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=debug ; (log level;default info; others: debug,warn,trace) | |
pidfile=%(ENV_HOME)s/etc/supervisor/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) | |
; the below section must remain in the config file for RPC | |
; (supervisorctl/web interface) to work, additional interfaces may be | |
; added by defining them in separate rpcinterface: sections | |
[rpcinterface:supervisor] | |
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | |
[supervisorctl] | |
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket | |
; The below sample program section shows all possible program subsection values, | |
; create one or more 'real' program: sections to be able to control them under | |
; supervisor. | |
[program:mongo-master] | |
command=/usr/local/bin/mongod --config %(ENV_HOME)s/etc/mongo/mongodb-master-no-fork.conf | |
process_name=%(program_name)s ; process_name expr (default %(program_name)s) | |
numprocs=1 ; number of processes copies to start (def 1) | |
directory=%(ENV_HOME)s/etc/mongo ; directory to cwd to before exec (def no cwd) | |
autostart=true ; start at supervisord start (default: true) | |
autorestart=unexpected ; whether/when to restart (default: unexpected) | |
user=root ; setuid to this UNIX account to run the program | |
redirect_stderr=true ; redirect proc stderr to stdout (default false) | |
[program:redis-6379] | |
command=/usr/local/bin/redis-server --loglevel verbose | |
process_name=%(program_name)s ; process_name expr (default %(program_name)s) | |
numprocs=1 ; number of processes copies to start (def 1) | |
directory=%(ENV_HOME)s/etc/redis ; directory to cwd to before exec (def no cwd) | |
autostart=true ; start at supervisord start (default: true) | |
autorestart=unexpected ; whether/when to restart (default: unexpected) | |
user=root ; setuid to this UNIX account to run the program | |
redirect_stderr=true ; redirect proc stderr to stdout (default false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment