diff --git a/README.md b/README.md index c2c0cd3..4a77b9c 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/doc/ghostreamer.service b/doc/ghostreamer.service new file mode 100644 index 0000000..23a5901 --- /dev/null +++ b/doc/ghostreamer.service @@ -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