Created
May 4, 2017 08:34
-
-
Save Shellbye/8c7c14e5607863d8b420eca14f9cf768 to your computer and use it in GitHub Desktop.
uwsgi start when system boots
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
# http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html#make-uwsgi-startup-when-the-system-boots | |
# create a directory for the vassals | |
sudo mkdir /etc/uwsgi | |
sudo mkdir /etc/uwsgi/vassals | |
# symlink from the default config directory to your config file | |
sudo ln -s /path/to/your/mysite/mysite_uwsgi.ini /etc/uwsgi/vassals/ | |
# run the emperor | |
uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data | |
# Edit /etc/rc.local and add: | |
# /usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data --daemonize /var/log/uwsgi-emperor.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment