Created
October 21, 2020 07:15
-
-
Save abkunal/d2d49bde6db4c3f0dfff89cadb14387a to your computer and use it in GitHub Desktop.
UWSGI configuration file for Supervisor
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
## https://levelup.gitconnected.com/integrating-new-relic-apm-with-uwsgi-1dedcd0f92ff | |
[program:uwsgi] | |
user=root | |
command=/home/ubuntu/virtualenvs/myenv/bin/newrelic-admin run-program | |
/home/ubuntu/virtualenvs/myenv/bin/uwsgi | |
-H /home/ubuntu/virtualenvs/myenv | |
-s /home/ubuntu/myapp/myapp_uwsgi.sock | |
-C | |
--chown-socket ubuntu | |
--pidfile=/home/ubuntu/myapp/myapp.pid | |
--chdir /home/ubuntu/myapp | |
--wsgi-file /home/ubuntu/myapp/myapp/wsgi.py | |
--pythonpath /home/ubuntu/myapp | |
--logto /var/log/uwsgi.log | |
--logformat "uwsgi %%(tmsecs) %%(ltime) %%(pid) %%(method) %%(uri) %%(status) %%(msecs) %%(size)" | |
--max-requests=500 | |
--processes=2 | |
--enable-threads | |
--single-interpreter | |
--lazy-apps | |
-m -M -l 100 -b 10000 | |
directory=/home/ubuntu/myapp | |
autorestart=true | |
environment=PYTHONPATH='/home/ubuntu/myapp:',DJANGO_SETTINGS_MODULE='myapp.settings',NEW_RELIC_CONFIG_FILE='/home/ubuntu/myapp/myapp/newrelic.ini',NEW_RELIC_ENVIRONMENT='production' | |
stopsignal=INT | |
startretries=0 | |
priority=30 | |
autostart=true | |
redirect_stderr=true | |
stdout_logfile=/var/log/supervisor/%(program_name)s.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment