Skip to content

Commit

Permalink
Merge pull request #179 from ChiffX/feature/docker-compose-instructions
Browse files Browse the repository at this point in the history
Docker compose README and docker-entrypoint updates
  • Loading branch information
Darkside138 authored Oct 14, 2024
2 parents aa77a93 + 397ad50 commit 5a30cf4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,31 @@ https://github.com/Darkside138/DiscordSoundboard/wiki
Smugaloof has made a great setup video you can watch [here](https://www.youtube.com/watch?v=DQSXP9AgYvw).
This will walk you through the process of getting your bot up and running.

### Docker Setup
Dockerhub image source: https://hub.docker.com/r/davefurrer/discordsoundboard

Using docker compose:
```
---
services:
discordsoundbot:
image: davefurrer/discordsoundboard:latest
container_name: DiscordSoundbot
environment:
- bottoken=<Insert bot token here>
- username=<Insert Discord username here>
- chatcommands=true
- dm=true
- commandcharacter=?
- sizelimit=2000
- leavesuffix=_leave
ports:
- 8080:8080
volumes:
- /path/to/sounds/directory:/etc/DiscordSoundboard/bin/sounds
restart: unless-stopped
```

## Setting correct permissions on your discord bot
To fix the issue of being stuck on "Connecting to websocket":
Login to your Discord Developer Portal and enable Privileged Intents for your bot. Go to https://discord.com/developers/applications select your bot, click Bot on the left, and then enable both of the sliders under Privileged Gateway Intents.
Expand Down
1 change: 1 addition & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ cd /etc/DiscordSoundboard/config
#Overwrite the bottoken and username to join channel config entries from environment variables passed into docker run
sed -i 's/bot_token=SOME_TOKEN_YOU_GOT_FROM_DISCORD/bot_token='$bottoken'/g' application.properties
sed -i 's/username_to_join_channel=YourUserName/username_to_join_channel='$username'/g' application.properties
sed -i 's/command_character=?/command_character='$commandcharacter'/g' application.properties

cd /etc/DiscordSoundboard/bin

Expand Down

0 comments on commit 5a30cf4

Please sign in to comment.