mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-09-03 07:24:52 +08:00
Deployment to other nodes was file by file, manual, and always validated against the local Nginx. One synchronization engine now backs every path. - Directory deployment: a directory carries its own deployment targets and every file below it inherits them, so a whole tree replicates in one request per node (#1559). - Node sync: one action pushes all configurations, sites and streams to the selected nodes, which is what a freshly added node needs (#1484). - Namespace replication: the namespace record is mirrored to its member nodes and synced sites and streams carry the namespace name, so every node groups them identically (#1744). - Automatic sync: a namespace can switch to the auto strategy with its own interval and a cron job re-pushes its content (#1582). - deploy_mode=remote no longer touches the local Nginx: no sites-enabled symlink, no local nginx -t and no local reload. The deployment intent moves to the database, and moving a site into a remote namespace detaches its leftover local symlink (#1505). The receiving side gains a batch config endpoint that writes every file and reloads once, with a per-file fallback for nodes that predate it. Disabling a site or stream became idempotent so converging a node reports no spurious failures, renaming only tests and reloads when the enabled tree actually changed, and stream delete now removes the stream record instead of a site one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
13 lines
431 B
Go
13 lines
431 B
Go
package model
|
|
|
|
type Config struct {
|
|
Model
|
|
Name string `json:"name"`
|
|
Filepath string `json:"filepath"`
|
|
// IsDir marks a directory level deployment record. Files stored below such a
|
|
// directory inherit its sync targets, so a whole tree can be replicated at once.
|
|
IsDir bool `json:"is_dir"`
|
|
SyncNodeIds []uint64 `json:"sync_node_ids" gorm:"serializer:json"`
|
|
SyncOverwrite bool `json:"sync_overwrite"`
|
|
}
|