Update user link handling in main.go to ensure consistent fallback messages and improve error handling for missing links.
Publish telemt-bot Docker image / build-and-push (push) Successful in 25s

This commit is contained in:
Denozordec
2026-03-09 19:09:31 +07:00
parent d8ddc53640
commit f7e8e58262
2 changed files with 196 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
cd /opt/telemt-plus
# 0) Остановить telemt перед переносом
docker compose stop telemt
# 1) Создать новую структуру
mkdir -p telemt-data/cache
# 2) Резервная копия текущих файлов
mkdir -p backup-telemt-$(date +%F-%H%M%S)
cp -a config.toml proxy-secret cache docker-compose.yml backup-telemt-$(date +%F-%H%M%S)/ 2>/dev/null || true
# 3) Перенос данных в telemt-data
[ -f config.toml ] && cp -f config.toml telemt-data/config.toml
[ -f proxy-secret ] && cp -f proxy-secret telemt-data/proxy-secret
[ -d cache ] && cp -a cache/. telemt-data/cache/
# 4) Права под пользователя контейнера telemt (uid/gid 999)
chown -R 999:999 telemt-data
find telemt-data -type d -exec chmod 750 {} \;
find telemt-data -type f -exec chmod 640 {} \;
chmod 660 telemt-data/config.toml 2>/dev/null || true
chmod 770 telemt-data/cache 2>/dev/null || true
# 5) Перезапуск контейнера после правки compose
docker compose up -d --force-recreate telemt
# 6) Проверка
docker logs --tail=100 telemt
docker exec telemt sh -lc 'ls -ld /run/telemt /run/telemt/cache; ls -l /run/telemt/config.toml'