Add info on how to run in standalone development mode
This commit is contained in:
parent
a029c47a61
commit
0d08503421
22
README.md
22
README.md
|
@ -33,6 +33,8 @@ cp nxy/files/{.env,config.json} .
|
||||||
vim .env config.json
|
vim .env config.json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Running as Service
|
||||||
|
|
||||||
Enable linger for the bot user (so it starts at boot and keeps running), install and activate systemd unit:
|
Enable linger for the bot user (so it starts at boot and keeps running), install and activate systemd unit:
|
||||||
```sh
|
```sh
|
||||||
sudo loginctl enable-linger nxy
|
sudo loginctl enable-linger nxy
|
||||||
|
@ -46,3 +48,23 @@ Install and activate timer for database dumps:
|
||||||
ln -fs $HOME/nxy/files/nxy-db-dump.{timer,service} $HOME/.config/systemd/user
|
ln -fs $HOME/nxy/files/nxy-db-dump.{timer,service} $HOME/.config/systemd/user
|
||||||
systemctl --user enable --now nxy-db-dump.timer
|
systemctl --user enable --now nxy-db-dump.timer
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Running as Standalone in Development Mode
|
||||||
|
|
||||||
|
For development set the BOT_DEV variable:
|
||||||
|
|
||||||
|
```
|
||||||
|
export BOT_DEV=
|
||||||
|
```
|
||||||
|
|
||||||
|
Then add the current git repository to your python path:
|
||||||
|
|
||||||
|
```
|
||||||
|
export PYTHONPATH=<git repository>:$PYTHONPATH
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally run nxy:
|
||||||
|
|
||||||
|
```
|
||||||
|
python3 -m bot
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue
Block a user