Update README.md

This commit is contained in:
2026-03-28 17:45:49 +00:00
parent 224b7a886f
commit fc2b5bbc71

View File

@@ -1,23 +1,41 @@
# 🐳 Discord Docker Monitor Bot # 🐳 Discord Docker Monitor Bot
A Discord bot that monitors your Docker containers and displays their status in dedicated channels — updated automatically every 30 seconds. [![Docker Pulls](https://img.shields.io/docker/pulls/survivalful/discord-docker-bot)](https://hub.docker.com/r/survivalful/discord-docker-bot)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Docker Image Size](https://img.shields.io/docker/image-size/survivalful/discord-docker-bot/latest)](https://hub.docker.com/r/survivalful/discord-docker-bot)
Monitor your Docker containers directly from Discord — automatic status updates every 30 seconds, grouped by project, with read-only channels for your team.
> 📸 *[Screenshot or GIF here]*
--- ---
## ✨ Features ## ✨ Features
- 📋 List all Docker containers on your host - 📋 List all Docker containers on your host
- 📁 Create groups of containers with dedicated Discord channels - 📁 Group containers with dedicated Discord channels
- 🔄 Automatic status updates every 30 seconds - 🔄 Automatic status updates every 30 seconds
- 🟢 Live status indicators (running, exited, paused, created) - 🟢 Live status indicators (running, exited, paused, created)
- 🔒 Channels are read-only for regular users - 🔒 Read-only channels for regular users
--- ---
## 🚀 Quick Start ## 🚀 Quick Start
### 1. Create your `.env` file **Option A — Docker Run (fastest)**
```bash
docker run -d \
--restart unless-stopped \
-e BOT_TOKEN=your_token \
-e DOCKER_HOST=tcp://your-host:2375 \
-e GUILD_ID=your_guild_id \
-e CATEGORY_NAME="Docker Status" \
survivalful/discord-docker-bot:latest
```
**Option B — Docker Compose (recommended)**
1. Create your `.env` file:
```env ```env
BOT_TOKEN=your_discord_bot_token BOT_TOKEN=your_discord_bot_token
DOCKER_HOST=tcp://your-docker-host:2375 DOCKER_HOST=tcp://your-docker-host:2375
@@ -25,8 +43,7 @@ GUILD_ID=your_discord_server_id
CATEGORY_NAME=Docker Status CATEGORY_NAME=Docker Status
``` ```
### 2. Start with Docker Compose 2. Create your `docker-compose.yml`:
```yaml ```yaml
services: services:
discord-bot: discord-bot:
@@ -36,6 +53,7 @@ services:
- .env - .env
``` ```
3. Start it:
```bash ```bash
docker compose up -d docker compose up -d
``` ```
@@ -47,7 +65,7 @@ That's it! 🎉
## 🤖 Commands ## 🤖 Commands
| Command | Description | | Command | Description |
|--------|-------------| |---|---|
| `!info` | Shows all available commands | | `!info` | Shows all available commands |
| `!container_list` | Lists all containers on the host | | `!container_list` | Lists all containers on the host |
| `!group_create <name> <container1> ...` | Creates a group with a dedicated channel | | `!group_create <name> <container1> ...` | Creates a group with a dedicated channel |
@@ -59,7 +77,7 @@ That's it! 🎉
## 📊 Status Indicators ## 📊 Status Indicators
| Symbol | Status | | Symbol | Status |
|--------|--------| |---|---|
| 🟢 | Running | | 🟢 | Running |
| 🔴 | Exited | | 🔴 | Exited |
| 🟡 | Paused | | 🟡 | Paused |
@@ -70,40 +88,53 @@ That's it! 🎉
## ⚙️ Requirements ## ⚙️ Requirements
- Docker & Docker Compose installed on the host - Docker & Docker Compose on the host
- Docker remote API enabled (`tcp://host:2375`) - Docker remote API enabled (`tcp://host:2375`)
- A Discord Bot Token ([create one here](https://discord.com/developers/applications)) - A Discord Bot Token ([create one here](https://discord.com/developers/applications))
--- ---
## 🔒 Security Note ## ⚠️ Security Warning
Never share your `.env` file — it contains sensitive tokens and credentials. The `.env` file is not included in the Docker image. Port `2375` is **unencrypted and unauthenticated**. Anyone with network access to that port can control your Docker daemon.
**Recommendations:**
- Use a firewall to restrict access to port 2375
- Only expose it on a trusted local network
- Consider using Docker socket proxy as a safer alternative
- Never expose port 2375 to the public internet
--- ---
## 🛠️ Support ## 🛠️ Troubleshooting
If you have any questions or run into issues, feel free to reach out: **Bot starts but no channels are created**
→ Check that `GUILD_ID` is correct and the bot has `Manage Channels` permission.
- 📧 Email: [team@survivalful.de](mailto:team@survivalful.de) **"Cannot connect to Docker"**
→ Make sure the Docker remote API is enabled and `DOCKER_HOST` points to the right address.
**Status stops updating**
→ Restart the container: `docker compose restart`
**Bot is offline in Discord**
→ Check your `BOT_TOKEN` and verify the bot is still in your server.
--- ---
## 🤝 Contributing ## 🤝 Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request on the [Git repository](https://git.survivalful.de/Survivalful/discord-docker-bot). Contributions are welcome! Open an issue or submit a pull request on the [Git repository](https://git.survivalful.de/Survivalful/discord-docker-bot).
--- ---
## 📄 License ## 📄 License
This project is licensed under the **GNU General Public License v3.0 (GPL-3.0)**. Licensed under [GNU GPL v3.0](https://www.gnu.org/licenses/gpl-3.0) — free to use, modify and distribute, but changes must stay open-source.
This means: ---
- ✅ Free to use, modify and distribute
- ✅ Source code must remain open
- ✅ Changes must be released under the same license
- ❌ Cannot be used in closed-source projects
See the full license: [GNU GPL v3.0](https://www.gnu.org/licenses/gpl-3.0.html) ## 🛠️ Support
- 📧 [team@survivalful.de](mailto:team@survivalful.de)
- 🐙 [git.survivalful.de/Survivalful/discord-docker-bot](https://git.survivalful.de/Survivalful/discord-docker-bot)