главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
path: root/libretranslate.service.example
diff options
context:
space:
mode:
Diffstat (limited to 'libretranslate.service.example')
-rw-r--r--libretranslate.service.example18
1 files changed, 18 insertions, 0 deletions
diff --git a/libretranslate.service.example b/libretranslate.service.example
new file mode 100644
index 0000000..7ae5203
--- /dev/null
+++ b/libretranslate.service.example
@@ -0,0 +1,18 @@
+[Unit]
+Description=LibreTranslate WSGI with Gunicorn and Nginx
+After=network.target
+
+[Service]
+User=$LT_USER
+Group=www-data
+WorkingDirectory=$LT_DIR
+Environment="PATH=$LT_DIR/venv/bin"
+ExecStart=$LT_DIR/venv/bin/gunicorn --workers 3 --bind unix:libretranslate.sock -m 007 wsgi:app
+EnvironmentFile=$LT_DIR/.env
+Restart=always
+ExecReload=/bin/kill -s HUP $MAINPID
+KillMode=mixed
+TimeoutStopSec=1
+
+[Install]
+WantedBy=multi-user.target