Update file readme.md
This commit is contained in:
parent
5591828a78
commit
f01f3c478f
35
readme.md
35
readme.md
@ -12,18 +12,35 @@ To interact: (not case-sensitive)
|
||||
To get started, clone this repo and create a `config.py` file in GarfBot's root directory. Open your favorite text editor or IDE and add your various API tokens as such:
|
||||
|
||||
```python
|
||||
GARFBOT_TOKEN = "token"
|
||||
JONBOT_TOKEN = "token"
|
||||
MONEYBOT_TOKEN = "token"
|
||||
OPENAI_TOKEN = "token"
|
||||
GIF_TOKEN = "token"
|
||||
GARFBOT_TOKEN = "token"
|
||||
JONBOT_TOKEN = "token"
|
||||
MONEYBOT_TOKEN = "token"
|
||||
OPENAI_TOKEN = "token"
|
||||
GIF_TOKEN = "token"
|
||||
```
|
||||
If you want to configure a more secure setup go ahead.
|
||||
If you want to configure a more secure setup, go ahead.
|
||||
|
||||
Next I recommend building a docker image for each bot using the included DockerFile as a template. Run each container binding /usr/src/app to GarfBot's CWD.
|
||||
Next, I recommend building a docker image for each bot using the included DockerFile as a template. Run each container binding /usr/src/app to GarfBot's CWD.
|
||||
|
||||
Example:
|
||||
```console
|
||||
crate@raspberrypi:~/garfbot $ docker build -t garfbot .
|
||||
crate@raspberrypi:~/garfbot $ docker run -d --restart always -v $PWD:/usr/src/app --name garfbot garfbot
|
||||
crate@raspberrypi:~/garfbot $ docker build -t garfbot .
|
||||
crate@raspberrypi:~/garfbot $ docker run -d --restart always -v $PWD:/usr/src/app --name garfbot garfbot
|
||||
```
|
||||
|
||||
Or if you prefer to install dependencies (from requirements.txt) on a host and run as a systemd service:
|
||||
```console
|
||||
[Unit]
|
||||
Description=garfbot
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
User=pi
|
||||
WorkingDirectory=/home/crate/garfbot
|
||||
ExecStart=/usr/bin/python ./garfbot.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
Loading…
Reference in New Issue
Block a user