You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
3 weeks ago | |
---|---|---|
src | 3 weeks ago | |
types | 1 month ago | |
.dockerignore | 1 month ago | |
.gitignore | 1 month ago | |
Dockerfile | 1 month ago | |
LICENSE | 1 month ago | |
README.md | 1 month ago | |
docker-compose.yml | 3 weeks ago | |
package-lock.json | 1 month ago | |
package.json | 1 month ago | |
tsconfig.json | 1 month ago |
README.md
Gwei Alert Bot
Introduction
This repo contains Docker build files for a Discord bot built with Node.js and utilizes a composed Redis container for storage.
Requirements
- Docker + Docker Compose
- A Discord bot token
- A EVM RPC endpoint URL (websocket enabled) OR a local node running at
localhost:8545
(using docker host network mode)
Usage
- Clone the repository to your local machine
git clone https://git.ssh.surf/MrTuxedo/gwei-alert-bot.git
- Create a .env file in the root of the project and add the following environment variables:
RPC_URL=<your rpc url>
DISCORD_BOT_TOKEN=<your discord bot token>
DISCORD_CLIENT=<your discord client ID>
- Run the Docker container
docker compose up -d
Rebuilding with new changes
- 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 --build
Environment Variables
The following environment variables must be set in either .env
or docker-compose.yml
in order for the bot to function properly:
- RPC_URL: Your RPC url
- DISCORD_BOT_TOKEN: the Oauth2 token for your Discord bot.
- DISCORD_CLIENT: the client ID for your Discord bot. (app ID)