SafeBox is a discord bot. It uses Node JS as runtime and it's self containered inside Docker.
Define a file called .env
like this:
# Discord configuration
CLIENT_ID=
GUILD_ID=
DISCORD_TOKEN=
# MongoDB credentials
MONGO_INITDB_ROOT_USERNAME=
MONGO_INITDB_ROOT_PASSWORD=
MONGO_INITDB_URL=
Define a file called compose.yaml
like this:
services:
bot:
image: tommy03/safebox
volumes:
- bot:/bot
env_file:
- .env
mongodb:
image: mongo
volumes:
- configdb:/data/configdb
- db:/data/db
restart: always
ports:
- 27017:27017
env_file:
- .env
volumes:
bot:
db:
configdb:
networks:
front-tier: {}
back-tier: {}
This is needed to deploy the bot correctly (make sure to set these variables).
Start the bot like this: docker compose up -d