Repository navigation
Docker‐compose example
Mike DeVita edited this page Jul 28, 2023
·
3 revisions
outline how to run the onairdiscordbot using the latest docker image, using docker-compose.
Create a new file, docker-compose.yml using the example provided below, replacing each environment variable's example value with the correct value.
You will need to:
- Obtain the required OnAir Key's, see this wiki for more info
- Register a new bot and with Discord via their developer portal, see this wiki for more info
- Keep note of the
ApplicationIDand theToken
- Keep note of the
-
docker-compose up -d,-dis detached mode
docker-compose down
-
docker-compose logs -fshow latest log and follow it -
docker-compose logsto view latest log snapshot
version: '3'
services:
bot:
image: mikedevita/onairdiscordbot:latest
container_name: onairdiscordbot
# use external .env file
env_file: .env
# or pass environment variables
# directly in by defining them like so
# environment:
# DISCORD_TOKEN: '###_REPLACE_WITH_YOUR_DATA_###'
# DISCORD_CLIENTID: '###_REPLACE_WITH_YOUR_DATA_###'
# DISCORD_GUILDID: '###_REPLACE_WITH_YOUR_DATA_###'
# DISCORD_OWNER: '###_REPLACE_WITH_YOUR_DATA_###'
# DISCORD_CHANNEL: '###_REPLACE_WITH_YOUR_DATA_###'
# DISCORD_ONCONNECTNOTICE: '###_REPLACE_WITH_YOUR_DATA_###'
# DISCORD_DEPLOYCOMMANDS: '###_REPLACE_WITH_YOUR_DATA_###'
# ONAIR_COMPANYID: '###_REPLACE_WITH_YOUR_DATA_###'
# ONAIR_VAID: 'true'
# ONAIR_APIKEY: 'true'
# LOGLEVEL: 'info'
# LOG_TO_CONSOLE: 'true'