Skip to content

Docker initialization

kfirmeg edited this page Sep 14, 2021 · 6 revisions

Docker initialization

Windows setup

Install Docker

First download and install docker from here: Docker-desktop.

Download and setup repository

Next clone the repository.

Then add the config.json file to the cloned folder and fill it according to the information on the main page.

Make sure to put the mongo_URI as "mongodb://master-bot:admin@mongo:27017/".
master-bot being the default username, and admin being the default password for the admin user in the db. These can be changed in the docker-compose.yml file.

Create docker composite container

Lastly open up cmd/bash/terminal, cd into that folder and run the following command: docker-compose up.

Now you should you be able to see that 2 images have been created, one for the bot and one for the database. There should also be a running composite-container made of these 2 images meaning that your bot should be up and running.

All that's left to do is enjoy your effortlessly run Discord bot.

Linux setup

Install Docker and Docker-compose

First go here: Docker engine, pick your linux distribution and follow the instructions for installation.
Now go here: Docker compose, make sure to pick the linux tab and follow the instructions for installations.

Download and setup repository

Next clone the repository.

Then add the config.json file to the cloned folder and fill it according to the information on the main page.

Make sure to put the mongo_URI as "mongodb://master-bot:admin@mongo:27017/".
master-bot being the default username, and admin being the default password for the admin user in the db. These can be changed in the docker-compose.yml file.

Create docker composite container

Lastly open up cmd/bash/terminal, cd into that folder and run the following command: docker-compose up.

Now you should you be able to see that 2 images have been created, one for the bot and one for the database. There should also be a running composite-container made of these 2 images meaning that your bot should be up and running.

All that's left to do is enjoy your effortlessly run Discord bot.