2 Commits

Author SHA1 Message Date
Your Name e854137681 feat(docker): add repo_region (auto/official/cn) + point service at canonical path
Two changes:

1) Docker generator: introduce 'repo_region' select field with three modes:
     auto     — probe download.docker.com (5s timeout); fall back to Tuna
                mirror if unreachable. Default.
     official — force download.docker.com URLs (GPG + apt/yum repo).
     cn       — force mirrors.tuna.tsinghua.edu.cn/docker-ce URLs.
   The apt/yum repo body now uses ${DOCKER_REPO_APT}/${DOCKER_REPO_YUM}
   variables instead of hardcoded URLs. yum/dnf uses 'command -v
   yum-config-manager' to pick the right tool (dnf-only distros like
   Rocky/Alma now skip the failed yum-config-manager probe).

   Tuna URLs verified reachable: curl -fsSI returned 200 for both
   linux/ubuntu/gpg and linux/centos/gpg. registry_mirror default also
   switched to docker.mirrors.ustc.edu.cn (was tencent cloud).

2) shell-gen.service: point WorkingDirectory and ExecStart at
   /fs/1000/ftp/Project/shell-gen (the canonical git checkout) instead
   of /root/shell-gen. The /root/ copy was a stale duplicate that
   caused previous fixes to silently not reach the running web UI.
   /root/shell-gen is preserved untouched (user has local artifacts
   there: vnc_*.sh, k8s/, deliverables/, etc).

Verified:
  - bash -n OK on all 3 region variants
  - region=auto with reachable overseas: picks official
  - region=auto with overseas-blocked (curl stubbed to fail):
    DOCKER_REPO_APT/YUM correctly fall back to tuna.tsinghua,
    warning emitted on stderr
  - region=official: forces official URLs, no probe
  - region=cn: forces Tuna URLs, no probe
  - 7 other sampled generators unchanged (memcached, wireguard,
    rabbitmq, chrony, mongodb, nginx, redis all bash -n OK,
    $PKG_INSTALL count 0)
2026-08-07 13:24:58 +08:00
cnbug 319f683a16 Initial commit: 50 shell-script generators with web UI
- 8 categories / 50 generators covering middleware, databases, runtimes,
  systemd services, system tools, network, monitoring, security
- VNC supports XFCE / GNOME / KDE Plasma / MATE / LXQt desktops
- Node.js versions 18-26 (incl. current LTS 24 Krypton and current 26)
- Live preview, copy / download / multi-script bundle in web UI
- Distro-aware (Ubuntu/Debian/CentOS/RHEL/Rocky/Alma/Fedora)
- All 50 generators pass bash -n syntax check
- Zero pip dependencies (Flask stdlib only)
2026-08-04 00:36:35 +08:00