How to deploy on Docker - hackarmour/discord-assistant Wiki

Deploying on Docker

Discord Assistant by default comes with Dockerfile so there is not much to do.

Cloning the repo

First make a folder on your server user's home directory and cd into it.

Then, clone the repository into the folder by:

git clone https://github.com/hackarmour/discord-assistant.git .

Make sure you always use the master branch by

git checkout master

Adding Bot Info

now, open Configuration/config.js, and you will see these two variable data inside:

{"token": "Your Token Here", "starttime": null}

inside the variable token, replace Your Token Here with your Discord bot's token.

Note: Make sure you put the bot token inside the two quotation marks only, do NOT remove the quotations

Building a Docker Image

After you've done replacing bot's token, time to build a production image for Docker, we will do this by:

docker build -t {somename} .

Replace {somename} with a name you desired for the bot, it can be anything.

But make sure you remember the name because we can run the bot with its name only.

Deploying as a Docker container

After done with all the above steps, time to deploy our bot!

We can deploy the bot by:

docker run -d {buildname}

Make sure you replace {buildname} with the name you chose earlier.

Now our bot is online!

Last thing to check if the bot is running, we'll just do

docker ps

and look for our build image, if you can't see anything, your bot probably failed to start. And if you can see an instance, Voila! your bot is online and ready to use! 🚀