-
Build and start the bot:
docker-compose up -d
-
View logs:
docker-compose logs -f
-
Stop the bot:
docker-compose down
-
Restart the bot:
docker-compose restart
-
Build the image:
docker build -t dailynode-bot . -
Run the container:
docker run -d \ --name dailynode-bot \ --env-file .env \ -v $(pwd)/config.json:/app/config.json \ --restart unless-stopped \ dailynode-bot
Ensure your .env file contains:
DISCORD_TOKEN=your_discord_bot_token
clientId=your_client_id
guildId=your_guild_idUpdate the bot:
docker-compose down
docker-compose build --no-cache
docker-compose up -dView real-time logs:
docker-compose logs -f dailynodeExecute commands inside container:
docker-compose exec dailynode shThe default timezone is set to America/New_York. To change it:
- Edit
docker-compose.yml - Change the
TZenvironment variable - Restart:
docker-compose restart
The config.json file is mounted as a volume to persist:
- LeetCode channel configuration
- Daily problem data
This ensures your settings survive container restarts.