feat: deploy.sh支持--target blue|green蓝绿部署+分目录隔离

This commit is contained in:
2026-06-02 12:54:50 +08:00
parent 832a2003f5
commit 10576cda1e
3 changed files with 48 additions and 22 deletions

View File

@@ -7,8 +7,8 @@ Wants=network.target
Type=simple
User=root
Group=root
WorkingDirectory=/root/rust/rust_backend
ExecStart=/root/rust/rust_backend/rust-backend
WorkingDirectory=/root/rust/rust_backend_blue
ExecStart=/root/rust/rust_backend_blue/rust-backend
Restart=always
RestartSec=5
StandardOutput=journal
@@ -31,7 +31,7 @@ NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=read-only
ReadWritePaths=/root/rust/rust_backend
ReadWritePaths=/root/rust/rust_backend_blue
SyslogIdentifier=rust-backend-blue

View File

@@ -7,8 +7,8 @@ Wants=network.target
Type=simple
User=root
Group=root
WorkingDirectory=/root/rust/rust_backend
ExecStart=/root/rust/rust_backend/rust-backend
WorkingDirectory=/root/rust/rust_backend_green
ExecStart=/root/rust/rust_backend_green/rust-backend
Restart=always
RestartSec=5
StandardOutput=journal
@@ -31,7 +31,7 @@ NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=read-only
ReadWritePaths=/root/rust/rust_backend
ReadWritePaths=/root/rust/rust_backend_green
SyslogIdentifier=rust-backend-green