add telegram bot and autossh tunnel

This commit is contained in:
2026-05-11 21:51:59 +02:00
parent b4c26f39f0
commit 9ac3705d5e
9 changed files with 1050 additions and 5 deletions

28
bot/docker-compose.yml Normal file
View File

@@ -0,0 +1,28 @@
services:
bot:
build: .
image: minecraft-telegram-bot:latest
container_name: minecraft-bot
restart: unless-stopped
environment:
BOT_TOKEN_FILE: /run/secrets/bot_token
MC_DIR: /mc
DB_PATH: /data/users.db
# Seeded only when DB is empty. Format: "id:Name,id:Name,..."
ADMIN_BOOTSTRAP: "${ADMIN_BOOTSTRAP:-1311866578:Paul}"
# The docker daemon resolves relative bind-mounts in /mc/docker-compose.yml from THIS host path.
COMPOSE_HOST_DIR: "${COMPOSE_HOST_DIR:-/home/paul/containers/minecraft}"
TZ: Africa/Johannesburg
volumes:
# Talk to host docker daemon to manage minecraft + autossh containers.
- /var/run/docker.sock:/var/run/docker.sock
# The minecraft compose project (compose file lives here).
- ..:/mc
# Persistent SQLite users DB.
- ./data:/data
secrets:
- bot_token
secrets:
bot_token:
file: ../bot.token