$ service supervisor stop

$ ps aux | grep uwsgi

$ kill -9 PID

$ rm /tmp/uwsgi.sock

$ vi /etc/supervisor/supervisor.conf
---
[inet_http_server]
port = 0.0.0.0:9001
username = future
password = future_01
---

$ vi /etc/supervior/conf.d/service.conf
---
[program:service]
command=/home/service/aws_flask/run.sh
environment=HOME='/home/service',USER='service'
directory=/home/service/aws_flask
autostart=true
autorestart=true
startretries=3
---

$ vi /home/service/aws_service/env/uwsgi.ini
---
[uwsgi]
chdir=/home/service/aws_flask/
chmod-socket=666
callable=app
module=app
socket=/tmp/uwsgi.sock
virtualenv=/home/service/aws_flask

master=true
processes=5
max-requests=1000
harakiri=10
lazy-apps=true
logto=/var/log/uwsgi/uwsgi.log
enable-threads = true
---

vi /home/service/aws_service/run.sh
---
source /home/service/aws_service/bin/activate

exec uwsgi --ini /home/service/aws_service/env/uwsgi.ini
---

$ service nginx restart

$ cd /tmp; ls -al

$ /home/service/aws_flask/run.sh

ctrl + c

$ cd /tmp; ls -al

$ service supervisor start

$ supervisorclt

Posted by 앤비
,