2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

uwsgiのemperorモードのservice化メモ

Posted at

どっからコピペしたのかも
なぜ動いてるのかもよくわからないけど
今使ってるuwsgiのemperorモードでのservice化のためのファイル(uwsgi.service)をメモしておく。

~/.venv/ 下にuwsgiのためだけのvenv設定済みという前提

$ cd ~
$ mkdir .venv
$ python3.6 -m venv .venv/uwsgi
$ source .venv/uwsgi/bin/activate
$ (uwsgi) pip install uwsgi

/etc/systemd/system/uwsgi.service
権限は644 root:root

[Unit]
Description=uWSGI Emperor service

[Service]
ExecStartPre=/usr/bin/bash -c 'mkdir -p /run/uwsgi; chown nginx:nginx /run/uwsgi'
ExecStart=/home/yourname/.venv/uwsgi/bin/uwsgi --emperor /etc/uwsgi/vassals
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all

2
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?