修复service硬编码路径问题:动态替换部署路径,支持任意目录部署

This commit is contained in:
2026-05-13 12:05:40 +08:00
parent 4213c720c7
commit d0b7ed3245
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -6,11 +6,11 @@ Wants=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/root/auto-ssl/backend
WorkingDirectory={{DEPLOY_DIR}}/backend
Environment="PORT=9090"
Environment="ACME_PORT=8082"
Environment="GIN_MODE=release"
ExecStart=/root/auto-ssl/backend/autossl
ExecStart={{DEPLOY_DIR}}/backend/autossl
Restart=always
RestartSec=3
StandardOutput=journal+console