diff options
| author | user <user@node5.net> | 2024-07-20 12:09:32 +0200 |
|---|---|---|
| committer | user <user@node5.net> | 2024-07-20 12:09:32 +0200 |
| commit | c169fa66fc583733d4ea03b78a65eb2bda007908 (patch) | |
| tree | 3b2ac4ebb510bc30cb38fbace081bb243ec5a6ff | |
| parent | 9324bc325ea878a6d7d48d655e085f9a1731f938 (diff) | |
Prod config - Add SystemD service, uwsgi config
| -rw-r--r-- | text-tv.bornhack.node5.net.service | 14 | ||||
| -rw-r--r-- | uwsgi.ini | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/text-tv.bornhack.node5.net.service b/text-tv.bornhack.node5.net.service new file mode 100644 index 0000000..d3951e8 --- /dev/null +++ b/text-tv.bornhack.node5.net.service @@ -0,0 +1,14 @@ +[Unit] +Description=uWSGI instance to serve text-tv.bornhack.node5.net +After=network.target + +[Service] +User=tv +Group=www-data +WorkingDirectory=/opt/text-tv.bornhack.node5.net +Environment="PATH=/opt/text-tv.bornhack.node5.net/venv/bin" +ExecStart=/opt/text-tv.bornhack.node5.net/venv/bin/uwsgi --ini uwsgi.ini +ExecReload=/usr/bin/kill -1 $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/uwsgi.ini b/uwsgi.ini new file mode 100644 index 0000000..696a2a8 --- /dev/null +++ b/uwsgi.ini @@ -0,0 +1,12 @@ +[uwsgi] +module = src.app:app +pythonpath = src + +master = true +processes = 5 + +socket = text-tv.bornhack.node5.net.sock +chmod-socket = 660 +vacuum = true + +die-on-term = true |
