Skip to content

Commit

Permalink
v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MrUnknownDE committed Apr 28, 2022
1 parent 08e6750 commit e062566
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/Lavalink/Lavalink.jar
*.zip
49 changes: 49 additions & 0 deletions Lavalink/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
server: # REST and WS server
port: 6665
address: 0.0.0.0
lavalink:
server:
password: "localpassword"
sources:
youtube: true
bandcamp: true
soundcloud: true
twitch: true
vimeo: true
http: true
local: false
bufferDurationMs: 500 # The duration of the NAS buffer. Higher values fare better against longer GC pauses
frameBufferDurationMs: 5000 # How many milliseconds of audio to keep buffered
youtubePlaylistLoadLimit: 1 # Number of pages at 100 each
playerUpdateInterval: 5 # How frequently to send player updates to clients, in seconds
youtubeSearchEnabled: true
soundcloudSearchEnabled: true
gc-warnings: true
#ratelimit:
#ipBlocks: ["1.0.0.0/8", "..."] # list of ip blocks
#excludedIps: ["...", "..."] # ips which should be explicit excluded from usage by lavalink
#strategy: "RotateOnBan" # RotateOnBan | LoadBalance | NanoSwitch | RotatingNanoSwitch
#searchTriggersFail: true # Whether a search 429 should trigger marking the ip as failing
#retryLimit: -1 # -1 = use default lavaplayer value | 0 = infinity | >0 = retry will happen this numbers times

metrics:
prometheus:
enabled: false
endpoint: /metrics

sentry:
dsn: "https://[email protected]/6312454"
environment: "production"
# tags:
# some_key: some_value
# another_key: another_value

logging:
file:
max-history: 30
max-size: 1GB
path: ./logs/

level:
root: INFO
lavalink: INFO
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# redbot-docker-compose
One Step Redbot in Docker + Lavalink
# Redbot + Docker = LOVE


Here is a quick guide on how to install Redbot in a few quick steps.

**1. Install Docker and Docker-Compose**
```
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
curl -SL https://github.com/docker/compose/releases/download/v2.4.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
```

**2. Download this Repo or Release**
`wget https://github.com/MrUnknownDE/redbot-docker-compose/releases/v1.0.zip`

**3. Unpacking**
`unzip v1.0.zip`

**4. Edit docker-compose.yml**
![](https://trash.mrunknown.de/qUcA9/CeRitEza80.png/raw)


**5. Edit the Core.json**
![](https://trash.mrunknown.de/qUcA9/xUkINOYu37.png/raw)
*The bot owner is automatically replaced in the file with the inserted ID in docker-compose.yml.*

**6. Bot start**
`docker-compose up` ~ Can you start the bot for the first time and see if it shows many errors at startup.
`docker-compose up -d` ~ If the bot is started in the background.
`docker-compose down` ~ Stop the bot

## Troubleshooting
If the bot does not automatically connect to the Lavalink instance, you need to do the following on the Discord server:
![](https://trash.mrunknown.de/qUcA9/TUqUKumu20.png/raw)
9 changes: 9 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"docker": {
"DATA_PATH": "/data",
"COG_PATH_APPEND": "cogs",
"CORE_PATH_APPEND": "core",
"STORAGE_TYPE": "JSON",
"STORAGE_DETAILS": {}
}
}
14 changes: 14 additions & 0 deletions core/logs/latest.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[2022-04-28 16:42:11] [CRITICAL] red.main: The main bot task didn't handle an exception and has crashed
Traceback (most recent call last):
File "/data/venv/lib/python3.9/site-packages/redbot/__main__.py", line 475, in red_exception_handler
red_task.result()
File "/data/venv/lib/python3.9/site-packages/redbot/__main__.py", line 374, in run_bot
new_token = await interactive_config(
File "/data/venv/lib/python3.9/site-packages/redbot/core/cli.py", line 50, in interactive_config
token = input("> ")
EOFError: EOF when reading a line
[2022-04-28 16:42:11] [WARNING] red.main: Attempting to die as gracefully as possible...
[2022-04-28 16:42:11] [INFO] red.main: Shutting down from unhandled exception
[2022-04-28 16:42:20] [INFO] red.main: Signals.SIGTERM received. Quitting...
[2022-04-28 16:42:20] [INFO] red.main: Shutting down with exit code: ExitCodes.SHUTDOWN
[2022-04-28 16:42:20] [INFO] red.main: Please wait, cleaning up a bit more
14 changes: 14 additions & 0 deletions core/logs/red.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[2022-04-28 16:42:11] [CRITICAL] red.main: The main bot task didn't handle an exception and has crashed
Traceback (most recent call last):
File "/data/venv/lib/python3.9/site-packages/redbot/__main__.py", line 475, in red_exception_handler
red_task.result()
File "/data/venv/lib/python3.9/site-packages/redbot/__main__.py", line 374, in run_bot
new_token = await interactive_config(
File "/data/venv/lib/python3.9/site-packages/redbot/core/cli.py", line 50, in interactive_config
token = input("> ")
EOFError: EOF when reading a line
[2022-04-28 16:42:11] [WARNING] red.main: Attempting to die as gracefully as possible...
[2022-04-28 16:42:11] [INFO] red.main: Shutting down from unhandled exception
[2022-04-28 16:42:20] [INFO] red.main: Signals.SIGTERM received. Quitting...
[2022-04-28 16:42:20] [INFO] red.main: Shutting down with exit code: ExitCodes.SHUTDOWN
[2022-04-28 16:42:20] [INFO] red.main: Please wait, cleaning up a bit more
1 change: 1 addition & 0 deletions core/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"0": {"GLOBAL": {"schema_version": 2, "token": "PASTE YOUR DISCORD BOT TOKEN", "prefix": ["sys."], "locale": "de-DE", "owner": 155076323612688384, "last_system_info": {"python_version": [3, 9], "machine": "x86_64", "system": "Linux"}, "packages": ["audio"]}, "CUSTOM_GROUPS": {"CogManager": {"2938473984732": {}}, "Core": {"0": {"COG_DISABLE_SETTINGS": 2, "CUSTOM_GROUPS": 2, "COMMAND": 2, "SHARED_API_TOKENS": 2}}, "ModLog": {"1354799444": {"CASETYPES": 1, "CASES": 2}}, "Bank": {"384734293238749": {}}, "Audio": {"2711759130": {"EQUALIZER": 1, "GLOBALPLAYLIST": 1, "GUILDPLAYLIST": 2, "USERPLAYLIST": 2}}}}}
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3.2"
services:
redbot:
container_name: redbot
image: phasecorex/red-discordbot
links:
- redbot_lavalink
restart: unless-stopped
volumes:
- ./:/data
environment:
- OWNER=155076323612688384 #your Discord ID
- TZ=Europe/Berlin #your Timezone
- PUID=1000

redbot_lavalink:
container_name: redbot_lavalink
image: fredboat/lavalink:dev
restart: unless-stopped
volumes:
- ./Lavalink:/opt/Lavalink

0 comments on commit e062566

Please sign in to comment.