Files
termi-blog/deploy/systemd/README.md

28 lines
898 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# systemd timer 模板
这些模板默认假设:
- 仓库部署路径:`/opt/termi-astro`
- 使用 `docker compose -f deploy/docker/compose.package.yml --env-file deploy/docker/.env`
- backend / backend-worker 容器已长期运行
启用方式示例:
```bash
sudo cp deploy/systemd/*.service /etc/systemd/system/
sudo cp deploy/systemd/*.timer /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now termi-backup-all.timer
sudo systemctl enable --now termi-backup-prune.timer
sudo systemctl enable --now termi-backup-offsite-sync.timer
sudo systemctl enable --now termi-retry-deliveries.timer
sudo systemctl enable --now termi-weekly-digest.timer
sudo systemctl enable --now termi-monthly-digest.timer
```
如果你们不使用 systemd也可以直接参考同目录命令改成 cron。
最终上线前建议再对照:
- `deploy/systemd/GO_LIVE_CHECKLIST.md`