feat: isolate release source for installers and provisioning
Release / Build & Release (push) Canceled after 0s

This commit is contained in:
kory
2026-10-02 15:25:19 +08:00
parent ea7aebd276
commit f084ac5bae
10 changed files with 144 additions and 39 deletions
+12 -10
View File
@@ -38,6 +38,7 @@ func main() {
clusterSecret := os.Getenv("VPS_COMMANDER_CLUSTER_SECRET")
webPassword := os.Getenv("VPS_COMMANDER_WEB_PASSWORD")
adminToken := os.Getenv("VPS_COMMANDER_ADMIN_TOKEN")
installCommand := os.Getenv("VPS_COMMANDER_INSTALL_COMMAND")
if adminToken == "" {
adminToken = webPassword
}
@@ -61,16 +62,17 @@ func main() {
notificationManager.Start()
defer notificationManager.Stop()
s := &api.Server{
Auth: authManager,
Exec: executor.Local{MaxOutput: 1024 * 1024},
Cluster: cluster.NewManager(clusterSecret, store),
Store: store,
LocalName: local,
Notify: notificationManager,
AdminToken: adminToken,
ExecLimiter: make(chan struct{}, 32),
SearchLimiter: make(chan struct{}, 8),
LocalSessions: executor.NewSessionManager(0),
Auth: authManager,
Exec: executor.Local{MaxOutput: 1024 * 1024},
Cluster: cluster.NewManager(clusterSecret, store),
Store: store,
LocalName: local,
Notify: notificationManager,
AdminToken: adminToken,
InstallCommand: installCommand,
ExecLimiter: make(chan struct{}, 32),
SearchLimiter: make(chan struct{}, 8),
LocalSessions: executor.NewSessionManager(0),
}
if err := s.LoadSecurityPolicySnapshot(); err != nil {
log.Fatalf("load security policy snapshot: %v", err)