Bring the docs up to date with the running stack
The READMEs, CLAUDE.md and todo.md still described Authentik, services removed long ago (Ghost, MMDL, Postiz, Pinchflat...) and two servers. Now they list the 24 services actually deployed (checked against docker ps), explain that netcup and docker-01 are one machine, document Gondulf, StarPunk, Listmonk, Gokapi and dockcheck, and use bin/deploy throughout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+27
-26
@@ -1,35 +1,36 @@
|
||||
# Cron Role
|
||||
|
||||
## Purpose
|
||||
Manages scheduled tasks and automated maintenance jobs for the infrastructure.
|
||||
Cron jobs on the server (tag `cron`). "Cron jobs" in this repo always means
|
||||
jobs on the server, never on the machine running Ansible.
|
||||
|
||||
## What It Does
|
||||
## Jobs
|
||||
|
||||
### Warhammer RSS Feed Updater
|
||||
- Copies `update_warhammer_feed.sh` script to `/usr/local/bin/` with executable permissions
|
||||
- Creates a daily cron job that runs at 09:10 AM
|
||||
- The script performs these actions:
|
||||
1. Creates a temporary directory `/tmp/warhammer_feed`
|
||||
2. Runs a custom Docker container (`git.thesatelliteoflove.com/phil/rss-warhammer`) to generate RSS feed
|
||||
3. Copies the generated `warhammer_rss_feed.xml` to `/opt/stacks/caddy/site/tsol/feeds/`
|
||||
| Time | User | Job |
|
||||
|---|---|---|
|
||||
| 08:00 daily | phil | `~/.local/bin/run_dockcheck.sh`: container updates |
|
||||
| 09:10 daily | root | `/usr/local/bin/update_warhammer_feed.sh`: Warhammer RSS feed |
|
||||
|
||||
## Files Managed
|
||||
- `/usr/local/bin/update_warhammer_feed.sh` - RSS feed update script
|
||||
- Cron job: "Update Warhammer RSS Feed" (daily at 09:10)
|
||||
|
||||
## Dependencies
|
||||
- Requires Docker to be installed and running
|
||||
- Depends on the following Docker stacks being deployed:
|
||||
- Custom RSS generator container at `git.thesatelliteoflove.com/phil/rss-warhammer`
|
||||
- Caddy web server stack at `/opt/stacks/caddy/`
|
||||
|
||||
## Usage
|
||||
This role is automatically applied as part of the main site.yml playbook with the `cron` tag.
|
||||
### Dockcheck (container updates)
|
||||
- Downloads [dockcheck](https://github.com/mag37/dockcheck) and its Gotify
|
||||
notify templates into `/home/phil/.local/bin/`.
|
||||
- Templates `/home/phil/.config/dockcheck.config` from `dockcheck.config.j2`
|
||||
(Gotify token from `vault_dockcheck`).
|
||||
- Settings: `OnlyLabel=true` and `AutoMode=true`, so containers labelled
|
||||
`mag37.dockcheck.update=true` are pulled and recreated automatically; any
|
||||
other container with an update gets a Gotify notice. `dawarich_db` and
|
||||
`dawarich_redis` are skipped.
|
||||
- `run_dockcheck.sh` logs to `/var/log/dockcheck/dockcheck.log`.
|
||||
|
||||
To see what needs updating by hand, run dockcheck on the server:
|
||||
```bash
|
||||
# Deploy only cron jobs
|
||||
ansible-playbook site.yml -i hosts.yml --tags cron
|
||||
ssh phil@100.70.169.99 '~/.local/bin/dockcheck.sh -n'
|
||||
```
|
||||
|
||||
## Customization
|
||||
To add additional cron jobs, create new tasks in the main.yml file following the same pattern as the Warhammer feed updater.
|
||||
### Warhammer RSS feed
|
||||
`update_warhammer_feed.sh` runs the `git.thesatelliteoflove.com/phil/rss-warhammer`
|
||||
container to build `warhammer_rss_feed.xml` and copies it to
|
||||
`/opt/stacks/caddy/site/tsol/feeds/`, where Caddy serves it on the main site.
|
||||
|
||||
## Adding a job
|
||||
Add a `cron` task to `tasks/main.yml` (copy the script with `copy` first if it
|
||||
needs one), then `bin/deploy --tags cron`.
|
||||
|
||||
Reference in New Issue
Block a user