Docker Guide¶
Prerequisites¶
- Docker Core Engine
- Docker Compose (optional, but recommended)
Creating a Discord Bot & Getting Credentials
Installing WizBot with Docker¶
When deploying WizBot with Docker, you have two options: using Docker or Docker Compose. The following sections provide step-by-step instructions for both methods.
/// tab | Docker
Deploying WizBot with Docker¶
- Move to a directory where you want your WizBot's data folder to be (data folder will keep the database and config files) and create a data folder there.
- Mount the newly created empty data folder as a volume while starting your docker container. Replace YOUR_TOKEN_HERE with the bot token obtained from the creds guide above.
- Enjoy! 🎉
Updating your bot¶
If you want to update WizBot to the latest version, all you have to do is pull the latest image and re-run.
- Pull the latest image
- Re-run your bot the same way you did before
- Done! 🎉
/// /// tab | Docker Compose
- Choose Your Workspace: Select a directory where you'll set up your WizBot stack. Use your terminal to navigate to this directory. For the purpose of this guide, we'll use
/opt/stacks/wizbot/as an example, but you can choose any directory that suits your needs. - Create a Docker Compose File: In this directory, create a Docker Compose file named
docker-compose.yml. You can use any text editor for this task. For instance, to use thenanoeditor, typenano docker-compose.yml. -
Configure Your Docker Compose File: Populate your Docker Compose file with the following configuration:
-
Launch Your Bot: Now, you're ready to run Docker Compose. Use the following command:
docker compose up -d. - Navigate to Your Directory: Use
cd /opt/stacks/wizbot/to go to the directory containing your Docker Compose file. - Pull the Latest Images: Use
docker compose pullto fetch the latest images. - Restart Your Containers: Use
docker compose up -dto restart the containers.
///