Fun practice dockerizing an application
Find a file
2023-06-23 16:09:47 -05:00
config.txt first commit 2023-06-22 17:22:23 -05:00
docker-compose.yml fixes 2023-06-22 20:59:31 -05:00
Dockerfile change base image 2023-06-23 16:09:47 -05:00
JMusicBot-0.3.9.jar first commit 2023-06-22 17:22:23 -05:00
README.md readme edit 2023-06-22 22:32:10 -05:00
startup.sh fixes 2023-06-22 20:59:31 -05:00

JMusicBot Docker

Fun practice for building docker images and containerizing software

A pre-built image is available for use on DockerHub

All credit to jagrosh on github for his awesome music bot used to create this, view his repository for more information on the bot

Build

clone the directory

git clone https://github.com/justinlime/JMusicBot

cd to the newly cloned directory

cd JMusicBot

build the image (you will need docker installed)

docker build -t myjmusicbot .

Run

After built, you can run the image, a few environment variables are required:

docker run  -e TOKEN="{YOUR_DISOCRD_BOT_TOKEN}" -e OWNER="{OWNER_DISCORD_USER_ID}" myjmusicbot

Example:

docker run  -e TOKEN="NzE4NTU3OTg4OTY0ODg0NTg4.XuY5gQ.TmiRbw_WoApH0s2RXM-xHrpzxG8" -e OWNER="313417165581942745" myjmusicbot

Required Environment Variables

  • TOKEN=
  • OWNER=

Optional Environment Variables

These options are optional to change, if unchanged they will remain as default

The mentioned variables and their default values:

  • PREFIX=@mention
  • GAME=DEFAULT
  • STATUS=ONLINE
  • SONGINSTATUS=false
  • ALTPREFIX=NONE
  • HELP=help
  • NPIMAGES=false
  • STAYINCHANNEL=false
  • MAXTIME=0
  • ALONETIMEUNTILSTOP=0
  • UPDATEALERTS=true
  • LYRICSDEFAULT=A-Z Lyrics

See The config file for more options

Details

If you aren't sure how to get a TOKEN and OWNER ID, check these guides:

How to get Discord Bot Token

How to get Discord User ID