From e18b96f3df4089ab85ec750f3fd0fdf72b5d5a48 Mon Sep 17 00:00:00 2001 From: agessaman Date: Sat, 17 Jan 2026 09:40:16 -0800 Subject: [PATCH] chore: Update configuration and documentation for Docker setup - Added new configuration options in config.ini.example for monitoring channels, direct message responses, and banned users. - Updated docker-setup.sh to clarify build and start commands for Docker containers, including options to avoid pull warnings. - Revised README and DOCKER.md to reflect changes in Docker commands, emphasizing the importance of building the image before starting the container. --- DOCKER.md | 16 ++++++++++++++-- README.md | 10 ++++++++-- config.ini.example | 32 ++++++++++++++++---------------- docker-compose.yml | 2 ++ docker-setup.sh | 10 ++++++++-- 5 files changed, 48 insertions(+), 22 deletions(-) diff --git a/DOCKER.md b/DOCKER.md index d0bd944..c360be2 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -126,11 +126,23 @@ port = 8080 ### Using Docker Compose -The `docker-compose.yml` file will automatically build the image if it doesn't exist: +**Important**: To avoid pull warnings, build the image first: ```bash -docker-compose build +docker compose build ``` +Then start the container: +```bash +docker compose up -d +``` + +Or build and start in one command: +```bash +docker compose up -d --build +``` + +The `--build` flag ensures the image is built locally rather than attempting to pull from a registry. + ### Using Docker directly ```bash diff --git a/README.md b/README.md index 00ddcd0..f41396a 100644 --- a/README.md +++ b/README.md @@ -103,9 +103,15 @@ For containerized deployment using Docker: log_file = /data/logs/meshcore_bot.log ``` -3. **Start with Docker Compose**: +3. **Build and start with Docker Compose**: ```bash - docker-compose up -d + docker compose build + docker compose up -d + ``` + + Or build and start in one command: + ```bash + docker compose up -d --build ``` 4. **View logs**: diff --git a/config.ini.example b/config.ini.example index 977b30d..22fb227 100644 --- a/config.ini.example +++ b/config.ini.example @@ -112,6 +112,22 @@ auto_manage_contacts = false # Default: meshcore_bot.db db_path = meshcore_bot.db +[Channels] +# Channels to monitor (comma-separated) +# Bot will only respond to messages on these channels +# Use exact channel names as configured on your MeshCore node +monitor_channels = general,test,emergency + +# Enable DM responses +# true: Bot will respond to direct messages +# false: Bot will ignore direct messages +respond_to_dms = true + +[Banned_Users] +# List of banned user IDs (comma-separated) +# Bot will ignore messages from these users +banned_users = + [Localization] # Language code for bot responses (en, es, es-MX, es-ES, fr, de, ja, etc.) # Default: en (English) @@ -276,22 +292,6 @@ help = "Bot Help: test (or t), ping, help, hello, cmd, advert, @string, wx, aqi, # Override 'cmd' command output # cmd = "Available commands: test (or t), ping, help, hello, cmd, advert, @string, wx, aqi, sun, moon, solar, hfcond, satpass, prefix, path, sports, dice, roll, stats" -[Channels] -# Channels to monitor (comma-separated) -# Bot will only respond to messages on these channels -# Use exact channel names as configured on your MeshCore node -monitor_channels = general,test,emergency - -# Enable DM responses -# true: Bot will respond to direct messages -# false: Bot will ignore direct messages -respond_to_dms = true - -[Banned_Users] -# List of banned user IDs (comma-separated) -# Bot will ignore messages from these users -banned_users = - [Scheduled_Messages] # Scheduled message format: HHMM = channel:message # Time format: HHMM (24-hour, no colon) diff --git a/docker-compose.yml b/docker-compose.yml index 872f59d..27b3e0d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: build: context: . dockerfile: Dockerfile + # Image will be built locally (not pulled from registry) + # To avoid pull warnings, run: docker compose build image: meshcore-bot:latest container_name: meshcore-bot restart: unless-stopped diff --git a/docker-setup.sh b/docker-setup.sh index 350246c..ebae391 100755 --- a/docker-setup.sh +++ b/docker-setup.sh @@ -199,8 +199,14 @@ if [ -z "$SERIAL_DEVICE" ]; then echo "1. Connect your MeshCore device or configure TCP/BLE connection" fi echo "1. Review data/config/config.ini and adjust settings if needed" -echo "2. Start the container:" +echo "2. Build the Docker image (to avoid pull warnings):" +echo " docker compose build" +echo "" +echo "3. Start the container:" echo " docker compose up -d" echo "" -echo "3. View logs:" +echo " Or build and start in one command:" +echo " docker compose up -d --build" +echo "" +echo "4. View logs:" echo " docker compose logs -f"