This Docker image contains a Discord bot built with Node.js and utilizes SQLite for storage.
- Docker + Docker Compose
- A Discord bot token
- An Alchemy API key
- Clone the repository to your local machine
git clone https://github.com/GooeyTuxedo/metadata-analytics-bot.git- Create a .env file in the root of the project and add the following environment variables:
ALCHEMY_API_KEY=<your alchemy api key>
DISCORD_TOKEN=<your discord bot token>
DISCORD_CLIENT=<your discord client ID>- Run the Docker container
docker compose up -d- Deploy discord slash commands (on first run)
docker exec -it gooeylytics node scripts/deploy-commands.js- Destroy discord slash commands (if needed)
docker exec -it gooeylytics node scripts/destroy-commands.js- View container logs
docker logs -f gooeylytics- Stop the running bot and remove container by same name
docker compose down- Pull the new work
git pull- Build and Run
docker compose up -d --buildNote: You may want to occasionally clear unused docker images and cache items (this can take a very long time):
docker system pruneThe following environment variables must be set in the .env file in order for the bot to function properly:
- ALCHEMY_API_KEY: your alchemy api key.
- DISCORD_TOKEN: the Oauth2 token for your Discord bot.
- DISCORD_CLIENT: the client ID for your Discord bot. (app ID)