No description
- Shell 88.7%
- Dockerfile 11.3%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
|---|---|---|
| .dockerignore | ||
| .gitignore | ||
| .woodpecker.yml | ||
| config.sh | ||
| deploy.sh | ||
| Dockerfile | ||
| entrypoint.sh | ||
| LICENSE | ||
| README.md | ||
| run.sh | ||
Naaulu Live
Real-time rainfall estimation pipeline for countries. Runs in a Podman container, generates 5-minute, hourly, and daily rainfall plots, and deploys them to a web server.
Architecture
Host cron → podman run (ephemeral container)
├── estimate (*/5 min) → 5-min rainfall from radar
├── combine (hourly/daily) → hourly/daily accumulations
├── plot (*/5 min + hourly + daily) → PNG maps
└── deploy (every run) → SFTP to naaulu-org
Web viewer (index.html)
└── Select country/duration → view latest image → arrow key navigation
Prerequisites
- A Debian 13 (Trixie) server
- SFTP credentials for the hosting server
Install
sudo apt update
sudo apt install -y podman
sudo loginctl enable-linger $(whoami)
podman volume create naaulu-archive-bel
podman volume create naaulu-data-bel
podman pull git.naaulu.org/naaulu/naaulu-live:latest
Note:
loginctl enable-lingeris required so Podman can access the container runtime directory from cron jobs. Without it, cron runs without your user session and the storage paths are not available.
Run
Test a one-off run:
podman run --rm --name naaulu-bel \
-v naaulu-archive-bel:/root/.cache/naaulu \
-v naaulu-data-bel:/root/.local/share/naaulu \
-e WEB_USER=<sftp-username> \
-e WEB_HOST=<sftp-host> \
-e WEB_PASS=<sftp-password> \
-e NAAULU_COUNTRY=bel \
-e NAAULU_NETWORK=bel \
git.naaulu.org/naaulu/naaulu-live:latest /opt/naaulu-live/run.sh
Add a cron job (crontab -e):
*/5 * * * * podman run --rm --name naaulu-bel -v naaulu-archive-bel:/root/.cache/naaulu -v naaulu-data-bel:/root/.local/share/naaulu -e WEB_USER=<sftp-username> -e WEB_HOST=<sftp-host> -e WEB_PASS=<sftp-password> -e NAAULU_COUNTRY=bel -e NAAULU_NETWORK=bel git.naaulu.org/naaulu/naaulu-live:latest /opt/naaulu-live/run.sh >> ~/.local/share/naaulu-live.log 2>&1
Configuration
| Variable | Default | Description |
|---|---|---|
NAAULU_COUNTRY |
est |
Country code |
NAAULU_NETWORK |
est |
Gauge network for plot overlay |
NAAULU_PRODUCT |
dove |
Estimation method |
NAAULU_RESOLUTION_BASE |
1km |
5-min resolution |
NAAULU_RESOLUTION_COMBINED |
2km |
Hourly/daily resolution |
NAAULU_LOG_LEVEL |
info |
Log verbosity |
WEB_USER |
(required) | SFTP username |
WEB_HOST |
(required) | SFTP host |
WEB_PASS |
(required) | SFTP password, passed via -e |
REMOTE_DIR |
www |
Remote SFTP directory |
RETENTION_5MIN_HOURS |
3 |
Hours to keep 5-min images |
RETENTION_HOURLY_DAYS |
1 |
Days to keep hourly images |
RETENTION_DAILY_DAYS |
20 |
Days to keep daily images |
Troubleshooting
tail -50 ~/.local/share/naaulu-live.log
License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).