Skip to content

Commit 958a5c5

Browse files
committed
add ready-to-use docker-compose file
1 parent 37220f7 commit 958a5c5

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,10 @@ There are basically two ways to run and configure this discord bot:
2424
The easiest method to install and use this bot is by running it in a docker container. I suggest to use docker-compose
2525
for that, however, starting the container with `docker run` should be fine as well.
2626

27-
```yaml
28-
version: "3"
29-
30-
services:
31-
serviceName:
32-
image: droidwiki/discord-player-count
33-
restart: unless-stopped
34-
volumes:
35-
- ./config:/app/config
36-
environment:
37-
DISCORD_TOKEN: YOUR_DISCORD_BOT_TOKEN
38-
# You need more configuration here, look at the Configuration section
27+
There is a ready-to-use `docker-compose-yml` file available in this repository.
28+
Simply create a `.env` file next to it (copying the contents of the `example.env file), set the necessary configuration values as described further in this README and run this command to start the bot:
29+
```shell
30+
docker-compose up -d
3931
```
4032

4133
You can run as many containers as you want, one container per game server you want to track.

docker-compose.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: "3"
2+
3+
services:
4+
test:
5+
image: droidwiki/discord-player-count
6+
restart: unless-stopped
7+
volumes:
8+
- ./config:/app/config
9+
environment:
10+
# Instead of writing the environment variables here, use a `.env` file in the same directory where
11+
# the docker-compose.yml file is located. Use the example.env file contents as a blueprint.
12+
# Add the necessary configuration values there.
13+
DISCORD_TOKEN: ${DISCORD_TOKEN}
14+
DISCORD_MESSAGE_CHANNEL_ID: ${DISCORD_MESSAGE_CHANNEL_ID}
15+
PLAYER_COUNT_PROVIDER: ${PLAYER_COUNT_PROVIDER}
16+
DISCORD_PUBLISHER_MESSAGE_FORMAT: ${DISCORD_PUBLISHER_MESSAGE_FORMAT}
17+
DISCORD_PUBLISHER_MESSAGE_QUEUED_FORMAT: ${DISCORD_PUBLISHER_MESSAGE_QUEUED_FORMAT}
18+
STEAM_API_TOKEN: ${STEAM_API_TOKEN}
19+
GAME_ADDRESS: ${GAME_ADDRESS}
20+
BM_ACCESS_TOKEN: ${BM_ACCESS_TOKEN}
21+
BM_SERVER_ID: ${BM_SERVER_ID}
22+
GAME_TYPE: ${GAME_TYPE}
23+
GAME_IP: ${GAME_IP}
24+
GAME_QUERY_PORT: ${GAME_QUERY_PORT}
25+
BE_RCON_HOST: ${BE_RCON_HOST}
26+
BE_RCON_PORT: ${BE_RCON_PORT}
27+
BE_RCON_PASSWORD: ${BE_RCON_PASSWORD}
28+
BE_RCON_MAX_PLAYERS: ${BE_RCON_MAX_PLAYERS}
29+
CFTOOLS_HOSTNAME: ${CFTOOLS_HOSTNAME}
30+
CFTOOLS_PORT: ${CFTOOLS_PORT}
File renamed without changes.

0 commit comments

Comments
 (0)