1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 19:42:20 +00:00

Systemd unit file

This commit is contained in:
Alexandre Iooss 2020-09-14 13:18:39 +02:00
parent fb45045f36
commit 73bf43afc5
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
2 changed files with 27 additions and 5 deletions

View File

@ -75,9 +75,14 @@ Now enable and start OvenMediaEngine, `sudo systemctl enable --now ovenmediaengi
It's WIP.
```
sudo apt install python3-ldap python3-flask
python3 -m venv venv --system-site-packages
source venv/bin/activate
pip install -e .
FLASK_APP=/home/erdnaxe/ghostreamer/ghostream flask run
sudo apt install python3-ldap python3-flask uwsgi-plugin-python3
git clone https://gitlab.crans.org/nounous/ghostream && cd ghostream
```
Copy [ghostreamer.service](doc/ghostreamer.service) to `/etc/systemd/system/ghostreamer.service`
and customize.
```
sudo systemctl daemon-reload
sudo systemctl enable --now ghostreamer
```

17
doc/ghostreamer.service Normal file
View File

@ -0,0 +1,17 @@
[Unit]
Description=Simple streaming server
After=network.target
[Service]
User=www-data
WorkingDirectory=/var/local/ghostream
Environment=FLASK_CONFIG=production
Environment=LDAP_URI=ldap://127.0.0.1:389
Environment=LDAP_USER_DN=cn=Utilisateurs,dc=crans,dc=org
Environment=SITE_NAME=Crans Stream
Environment=FAVICON=https://www.crans.org/images/favicon.ico
ExecStart=uwsgi --http-socket 127.0.0.1:8080 --master --plugin python3 --module ghostream:app --static-map /static=/var/local/ghostream/ghostream/static
Restart=always
[Install]
WantedBy=multi-user.target