Skip to content

Instantly share code, notes, and snippets.

@Shellbye
Created May 4, 2017 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shellbye/8c7c14e5607863d8b420eca14f9cf768 to your computer and use it in GitHub Desktop.
Save Shellbye/8c7c14e5607863d8b420eca14f9cf768 to your computer and use it in GitHub Desktop.
uwsgi start when system boots
# 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