mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-06 21:11:50 +08:00
feat(deploy,gateway): add dual-edition deployment/migration/rollback and TUN route reconciliation
- Add standalone edition (`Dockerfile.standalone`, `docker-compose.standalone.yml`) alongside sandbox edition and publish both in `.github/workflows/release.yml`. - Implement `scripts/deploy-lib.sh`, `install.sh`, `update.sh`, and `scripts/artex-sandbox-firewall.sh --cleanup` with edition detection, legacy standalone -> sandbox migration (symlink-safe workspace permissions), automatic snapshots with pinned `artex-rollback/*` images + PG dump, auto/manual cross-edition rollback, and post-rollback upstream unpinning. - Update `ensureWritableDir` in `internal/sandbox/manager.go` to safely migrate nested root-owned workspace files without following symlinks. - Expose `deploy_edition` in `/api/update/check` and update `UpdateCard` UI/i18n warnings for sandbox vs standalone in-app update/rollback. - Reconcile `artex-gateway` TUN policy routing (`priority 218`, `raw PREROUTING`, `nat POSTROUTING`, `DOCKER-USER`) every 15s to self-heal after host network rule flushes or bridge changes. - Add unit and shell tests (`scripts/deploy_test.sh`, `cmd/artex-gateway/tun_linux_test.go`, `internal/sandbox/sandbox_test.go`, `server/update_test.go`) and update `README.md` / `.env.example`.
This commit is contained in:
1 parent
d786de90af
commit
07309e4530
23 files changed
+2107
-144
No files matched your search
@@ -25,6 +25,9 @@ func (cfg *updateSettings) validate() error {
|
||||
|
||||
func (s *Server) loadUpdateSettings() (updateSettings, error) {
|
||||
cfg := updateSettings{}
|
||||
if s.m == nil || s.m.pg == nil {
|
||||
return cfg, nil
|
||||
}
|
||||
raw, ok, err := s.m.pg.GetSetting(updateSettingsKey)
|
||||
if err != nil {
|
||||
return cfg, fmt.Errorf("读取更新网络设置失败: %w", err)
|
||||
|
||||
Reference in new issue
Block a user