启动supervisor方法一: (brew安装的情况下)
brew services start supervisor
brew services restart supervisor
启动supervisor方法二:
supervisord -c /etc/supervisord.conf
判断是不是启动成功:
ps aux | grep supervisord
[program:atlas] ; 是应用程序的唯一标识,不能重复
directory = /Users/zhangyingjie/IdeaProjects/atlas/target/atlas-server-1.0.2 ; >程序的启动目录
command = /Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/bin/java -Dlog4j.configurationFile=file://Users/zhangyingjie/IdeaProjects/atlas/target/atlas-server-1.0.2/config -server -Xmx2G -Xms2G -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintHea
pAtGC -XX:+PrintTenuringDistribution -Xloggc:/Users/zhangyingjie/IdeaProjects/atlas/target/atlas-server-1.0.2/logs/gc/atlas-server-gc.log -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -jar /Users/zhangyingjie/IdeaProjects/atlas/target/atlas-server-1.0.2/Users/zhangyingjie/IdeaProjects/atlas/target/atlas-server-1.0.2/lib/atlas-1.0.2.jar --spring.config.location=/Users/zhangyingjie/IdeaProjects/atlas/target/atlas-server-1.0.2/config/application.yml ; 启动命令
autostart=true ; 在 supervisord 启动的时候也自动启动
startsecs=3 ; 启动 5 秒后没有异常退出,就当作已经正常启动了
autorestart=true ; 程序异常退出后自动重启
startretries=3 ; 启动失败自动重试次数,默认是 3
stdout_logfile_maxbytes=20MB
stdout_logfile_backups=20
stdout_logfile=/Users/zhangyingjie/IdeaProjects/atlas/target/atlas-server-1.0.2/atlas.log ; stdout 日志文件,注意:要确保目录已经建立并且可以访问(写权限)
killasgroup=true
priority=1
numprocs=1
redicrect_stderr=true
stopwaitsecs=1
user=zhangyingjie
mac 部署supervisor
https://www.jianshu.com/p/050273859836