Hub stage 4: its own image and pipeline
docker/Dockerfile.hub builds the console and ships it with the hub sources on node:22-alpine, without node_modules, as a non-root user with a healthcheck. .gitea/workflows/hub.yaml checks and pushes git.shx.one/denozord/technitium-hub (latest from main, sha-*, X.Y.Z and X.Y from hub-v tags), independent of the console pipeline, which now ignores hub-only changes. Compose example for hub.shnt.top and hub/README.md, with the read-only permissions each server's token needs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
48b5d9fb15
commit
3f917c6bd2
5 files changed
+230
No files matched your search
@@ -0,0 +1,48 @@
|
||||
version: "3.8"
|
||||
|
||||
# Хаб: одна консоль со статистикой нескольких серверов Technitium (см. hub/README.md).
|
||||
# Подключается к уже работающему Traefik из compose.shnt.example.yaml (сеть dns-net).
|
||||
#
|
||||
# На КАЖДОМ сервере Technitium, один раз:
|
||||
# 1. Administration > Groups: группа hub-readers, ей право только View на Dashboard, Logs,
|
||||
# Apps (список приложений логирования для Query Logs) и Settings (состояние блокировки).
|
||||
# 2. Administration > Users: пользователь hub-reader в этой группе.
|
||||
# 3. Войти под ним и создать токен: Administration > Sessions > Create API Token.
|
||||
# Токены кладутся в .env рядом с этим файлом (не в git):
|
||||
# DNS_TOKEN=...
|
||||
# NDNS_TOKEN=...
|
||||
# HUB_USER=... # логин в сам хаб
|
||||
# HUB_PASSWORD=... # длинный пароль: у хаба нет ограничения числа попыток входа
|
||||
#
|
||||
# Обновление: docker compose pull technitium-hub && docker compose up -d technitium-hub
|
||||
|
||||
services:
|
||||
technitium-hub:
|
||||
image: git.shx.one/denozord/technitium-hub:latest
|
||||
container_name: technitium-hub
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- dns-net
|
||||
environment:
|
||||
# id=адрес, по порядку; токен каждого берётся из <ID>_TOKEN
|
||||
- HUB_SERVERS=dns=https://dns.shnt.top,ndns=https://ndns.shnt.top
|
||||
- DNS_TOKEN=${DNS_TOKEN}
|
||||
- NDNS_TOKEN=${NDNS_TOKEN}
|
||||
- HUB_USER=${HUB_USER}
|
||||
- HUB_PASSWORD=${HUB_PASSWORD}
|
||||
- HUB_DOMAIN=hub.shnt.top
|
||||
- TZ=Asia/Novosibirsk
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=dns-net"
|
||||
|
||||
- "traefik.http.routers.hub.rule=Host(`hub.shnt.top`)"
|
||||
- "traefik.http.routers.hub.entrypoints=websecure"
|
||||
- "traefik.http.routers.hub.tls.certresolver=myresolver"
|
||||
- "traefik.http.routers.hub.service=hub-svc"
|
||||
- "traefik.http.services.hub-svc.loadbalancer.server.port=8080"
|
||||
|
||||
networks:
|
||||
dns-net:
|
||||
external: true
|
||||
name: dns-net
|
||||
Reference in new issue
Block a user