Friday, October 6, 2023

Deploy Gunicorn using PM2

 Use below command:

 pm2 --name=py-api start "cd ~/code/python_tasks && source venv/bin/activate && cd api && gunicorn -k gevent app:app -b 0.0.0.0:5050 -w 2 --error-logfile /var/log/gunicorn/error.log --access-logfile /var/log/gunicorn/access.log --capture-output --log-level debug"

No comments:

Post a Comment