calathea: add config

This commit is contained in:
Jef Roosens 2025-01-12 23:19:37 +01:00
parent 2cfd746c52
commit 787a63ea0d
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
11 changed files with 137 additions and 1 deletions

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
data_dir='/mnt/data1/calathea'
snapshot_dir="${data_dir}.snapshot"
# Read-only snapshot for atomic backup
btrfs subvolume snapshot -r "$data_dir" "$snapshot_dir" || exit $?
/usr/local/bin/restic backup "$snapshot_dir"
# Always remove snapshot subvolume, even if restic fails
btrfs subvolume delete "$snapshot_dir"

View file

@ -0,0 +1,13 @@
[Unit]
Description=Simple plant tracker
After=docker.service
Requires=docker.service
[Service]
Type=exec
WorkingDirectory=/etc/calathea
ExecStart=/usr/bin/docker compose up
ExecStop=/usr/bin/docker compose down
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,8 @@
services:
app:
image: 'git.rustybever.be/chewing_bever/calathea:latest'
ports:
- '8013:8000'
volumes:
- '/mnt/data1/calathea/data:/data'