HA stage 2: DB-shared rate limiting + second server unit + monitor both-servers check (#52)
Co-authored-by: host <host@test.local>
This commit is contained in:
1 parent
fc8e337d0f
commit
06b9fd12fd
4 files changed
+170
-19
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# 第二台控制面(HA 阶段 2)。
|
||||
#
|
||||
# 注意:unit 文件不在 deploy tar 里,改动后须单独 scp 到
|
||||
# /etc/systemd/system/ 再 daemon-reload + enable + start。
|
||||
# 与 codex-cloud-server.service 完全相同,只改端口(8766):
|
||||
# 同代码、同 env、同 DB 连接串;nginx upstream 把两个端口都
|
||||
# 配上,任一挂了另一台继续接(webhook 去重在 DB 里,重复投递
|
||||
# 幂等)。WorkingDirectory 与 User 与一号机一致。
|
||||
[Unit]
|
||||
Description=Codex cloud control plane (second instance)
|
||||
After=network.target
|
||||
[Service]
|
||||
User=codexsvc
|
||||
WorkingDirectory=/opt/codex-app-server
|
||||
EnvironmentFile=/etc/codex-app-server/env
|
||||
ExecStart=/usr/bin/python3 -m cloud.server --host 127.0.0.1 --port 8766 --db /var/lib/codex-app-server/control.db
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user