Compare commits
No commits in common. "67343b4b6013a547bbabb9e421505dc4174ee04d" and "f82cd4aff2edb2ffe843916f0e12193dd90c3035" have entirely different histories.
67343b4b60
...
f82cd4aff2
22
README.md
22
README.md
@ -12,25 +12,13 @@ python setup.py install
|
|||||||
|
|
||||||
### Manual
|
### Manual
|
||||||
|
|
||||||
Create wrapper script (e.g. wrapper.py):
|
```shell
|
||||||
|
start-weblight
|
||||||
```python
|
|
||||||
from weblight import app
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app.run()
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Execute the wrapper script:
|
### systemd
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
python3 wrapper.py
|
$ systemctl enable weblight
|
||||||
|
$ systemctl start weblight
|
||||||
```
|
```
|
||||||
|
|
||||||
### gunicorn
|
|
||||||
|
|
||||||
```shell
|
|
||||||
gunicorn --bind 0.0.0.0:80 weblight:app
|
|
||||||
```
|
|
||||||
|
|
||||||
|
3
start-weblight
Normal file
3
start-weblight
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
python -m weblight $@
|
10
weblight.service
Normal file
10
weblight.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Weblight
|
||||||
|
After=multi-user.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=idle
|
||||||
|
ExecStart=/usr/local/bin/start-weblight
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user