thermograph/deploy/openmeteo/rclone-mount.service.example
Emi Griffith a26ca72834 Self-host the ERA5 archive via Open-Meteo (object storage) (#224)
Get the 45-year historical record off the rate-limited public Open-Meteo
archive API by running a private Open-Meteo instance that serves the
era5_seamless blend (0.1° ERA5-Land + 0.25° ERA5 for gusts) from the
compressed .om archive in object storage, mounted on the host with rclone.

- climate.py: make ARCHIVE_URL env-driven (THERMOGRAPH_ARCHIVE_URL) and pin
  models=era5_seamless on the archive fetches only, so a self-hosted instance
  serves the same 0.1° resolution; forecast path unchanged. The public API's
  default is already seamless, so dev/beta (URL unset) behave identically.
- docker-compose.openmeteo.yml: open-meteo-api + two rolling sync workers
  (era5_land 0.1°, era5 0.25° for gusts), bind-mounting the object-storage
  mount; the overlay points the app at the local instance.
- Makefile: om-up / om-down / om-backfill (one-time full-history backfill).
- Terraform: per-host openmeteo flag layers the overlay, renders OM_DATA_DIR,
  and provisions the host rclone systemd mount from the bucket credentials.
- deploy/openmeteo: operator runbook + rclone mount unit template.
2026-07-20 13:16:56 +00:00

32 lines
999 B
Text

# rclone FUSE mount for the Open-Meteo (ERA5) archive bucket.
#
# Before installing:
# - Replace BUCKET_NAME below with the object-storage bucket name.
# - `--allow-other` requires `user_allow_other` to be set in /etc/fuse.conf.
# - The `om-archive` remote must exist in /etc/rclone/rclone.conf (S3 remote).
#
# Install:
# sudo install -m0644 rclone-mount.service.example /etc/systemd/system/rclone-om.service
# sudo systemctl daemon-reload
# sudo systemctl enable --now rclone-om
[Unit]
Description=rclone mount for Open-Meteo ERA5 archive
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
ExecStartPre=/bin/mkdir -p /mnt/om-archive
ExecStart=/usr/bin/rclone mount om-archive:BUCKET_NAME /mnt/om-archive \
--config /etc/rclone/rclone.conf \
--vfs-cache-mode full \
--vfs-cache-max-size 80G \
--dir-cache-time 12h \
--allow-other \
--umask 000
ExecStop=/bin/fusermount -u /mnt/om-archive
Restart=on-failure
[Install]
WantedBy=multi-user.target