Skip to content

Instantly share code, notes, and snippets.

@zxx
Last active February 19, 2020 05:44
Show Gist options
  • Save zxx/924e0a34acc82712944b60a0e63fdd4c to your computer and use it in GitHub Desktop.
Save zxx/924e0a34acc82712944b60a0e63fdd4c to your computer and use it in GitHub Desktop.
[program:mongo]
command=/usr/local/opt/mongodb-community/bin/mongod --config /usr/local/etc/mongod.conf
[program:mysql]
command = /usr/local/opt/mysql/bin/mysqld_safe --datadir=/usr/local/var/mysql
# http://www.inanzzz.com/index.php/post/v1mg/controlling-nginx-with-supervisor
[program:nginx]
command=/usr/local/opt/nginx/bin/nginx -c /usr/local/opt/nginx/nginx.conf -g "daemon off;"
autostart=true
autorestart=true
startretries=5
numprocs=1
startsecs=0
process_name=%(program_name)s_%(process_num)02d
stderr_logfile=/var/log/supervisor/%(program_name)s_stderr.log
stderr_logfile_maxbytes=10MB
stdout_logfile=/var/log/supervisor/%(program_name)s_stdout.log
stdout_logfile_maxbytes=10MB
[program:redis]
command = /usr/local/opt/redis/bin/redis-server
supervisorctl status
supervisorctl reload
supervisorctl update
supervisorctl start nginx
supervisorctl stop nginx
supervisorctl restart nginx
supervisorctl tail -f nginx
@zxx
Copy link
Author

zxx commented Feb 19, 2020

nginx -g "daemon off;"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment