vieter: add podman-based deployment

This commit is contained in:
Jef Roosens 2025-07-04 16:10:32 +02:00
parent b2ea4ad0d3
commit 7f10c05cec
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
10 changed files with 173 additions and 32 deletions

View file

@ -0,0 +1,3 @@
arch.r8r.be {
reverse_proxy 127.0.0.1:8020
}

View file

@ -0,0 +1,16 @@
# vim: ft=systemd
[Unit]
Description=Self-hostable Arch repository server
[Container]
Image=docker.io/chewingbever/vieter:dev
EnvironmentFile=/etc/vieter/vieter.env
PublishPort=127.0.0.1:8020:8000
Volume=/mnt/data1/vieter/data:/data
[Service]
Restart=always
[Install]
WantedBy=default.target

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
data_dir='/mnt/data1/vieter/data'
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"