Added instructions for running with systemd
This commit is contained in:
parent
87f0a8d496
commit
95a43a850a
27
README.md
27
README.md
|
@ -93,6 +93,33 @@ pip install -r requirements.txt
|
||||||
./whoogle-search
|
./whoogle-search
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### systemd Configuration
|
||||||
|
After building the virtual environment, add the following to `/lib/systemd/system/whoogle.service`:
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Whoogle
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=<whoogle_directory>
|
||||||
|
ExecStart=<whoogle_directory>/venv/bin/python3 -um app --host 0.0.0.0 --port 5000
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
|
SyslogIdentifier=whoogle
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
Then,
|
||||||
|
```
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable whoogle
|
||||||
|
sudo systemctl start whoogle
|
||||||
|
```
|
||||||
|
|
||||||
### E) Manual (Docker)
|
### E) Manual (Docker)
|
||||||
1. Ensure the Docker daemon is running, and is accessible by your user account
|
1. Ensure the Docker daemon is running, and is accessible by your user account
|
||||||
- To add user permissions, you can execute `sudo usermod -aG docker yourusername`
|
- To add user permissions, you can execute `sudo usermod -aG docker yourusername`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user