Skip to content

Commit

Permalink
Updated docs and example to include servers.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mylesagray committed Dec 19, 2022
1 parent 762ccbe commit 667c717
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ services:
image: ghcr.io/kharms-dev/discord-power-bot:latest
build: .
env_file: .env
restart: unless-stopped
restart: unless-stopped
volumes:
- servers.json:/home/appuser/servers.json
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
## Usage

* Fill out `.env` file with your Discord token and URLs.
* Fill out `servers.json` with your server details and types to allow querying of clients on power requests
* Optional: set `COOLDOWN` for `boot`, `reboot` and `shutdown` cooldown timers in seconds, if left empty it defaults to `300`.
* Optional: set `POWERBOT_ROLE` to limit access to `boot`, `reboot` and `shutdown`. This takes a comma separated list of either role names or role ids, if left unset defaults to the `@everyone` role.


For WOL service, use this Docker image: <https://github.com/daBONDi/go-rest-wol>

For the shutdown, reboot and status URLs, a service that responds to HTTP GETs with code `200` on success is fine, we are using [Airytec SwitchOff](http://www.airytec.com/en/switch-off/).
Expand All @@ -18,5 +18,5 @@ docker compose up -d
Bare docker cli:

```sh
docker run --env-file=/.env --restart=unless-stopped ghcr.io/mylesagray/discord-power-bot:latest
docker run --env-file=/.env --restart=unless-stopped -v servers.json:/home/appuser/servers.json ghcr.io/mylesagray/discord-power-bot:latest
```
23 changes: 23 additions & 0 deletions servers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"ip_address": "10.56.0.175",
"name": "DCS Server Serialise",
"password": "",
"port": 10309,
"server_type": "DCS"
},
{
"ip_address": "172.16.69.180",
"name": "Arma Server Serialise",
"password": "",
"port": 2303,
"server_type": "STEAM"
},
{
"ip_address": "fe80::a00:20ff:feb9:17fa",
"name": "Space Engineers Server Serialise",
"password": "",
"port": 27019,
"server_type": "SPACE_ENGINEERS"
}
]

0 comments on commit 667c717

Please sign in to comment.