Created
October 21, 2020 07:24
-
-
Save abkunal/25b7b3358db43ba15e7342484bf17da2 to your computer and use it in GitHub Desktop.
UWSGI service file for systemd
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 | |
[Unit] | |
Description=uWSGI Emperor service | |
[Service] | |
Environment="NEW_RELIC_CONFIG_FILE=/home/ubuntu/myapp/myapp/newrelic.ini" | |
Environment="NEW_RELIC_ENVIRONMENT=production" | |
ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown ubuntu:www-data /run/uwsgi' | |
ExecStart=/home/ubuntu/virtualenvs/myenv/bin/newrelic-admin run-program /home/ubuntu/virtualenvs/myenv/bin/uwsgi --emperor /etc/uwsgi/sitesRestart=always | |
KillSignal=SIGQUIT | |
Type=notify | |
NotifyAccess=all | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment