run script and service

This commit is contained in:
Dmitry Belyaev 2021-06-17 15:56:44 +03:00
parent 49bf010b87
commit ca950ed515
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3
3 changed files with 23 additions and 2 deletions

View File

@ -1,8 +1,9 @@
Flask==2.0.0
Flask-RESTful==0.3.9
flask-cors==3.0.10
jinja2==2.11.3
jinja2==3.0
PyYAML==5.4.1
pathvalidate==2.4.1
transliterate==1.10.2
fire==0.4.0
gunicorn==19.9.0

7
run.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/sh
cd "$( dirname "$0" )" || exit
. venv/bin/activate
gunicorn --bind 0.0.0.0:18333 pub1c-rest:app

13
webpub1c-admin.service Normal file
View File

@ -0,0 +1,13 @@
[Unit]
Description=1C Web Publication Admin service
After=apache2.service apache_restarter.service
Wants=apache2.service apache_restarter.service
[Service]
ExecStart=/path/run.sh
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=2s
[Install]
WantedBy=multi-user.target