should work now

This commit is contained in:
2026-07-23 18:29:16 +02:00
parent 269241003d
commit e56e612891
10 changed files with 133 additions and 10 deletions
+14
View File
@@ -0,0 +1,14 @@
# =========================
# General
# =========================
DOMAIN=tomasrivera.ch
TZ=Europe/Zurich
# =========================
# ArchiveBox
# =========================
ARCHIVEBOX_ADMIN_USERNAME=admin
ARCHIVEBOX_ADMIN_PASSWORD=change_me
+16 -10
View File
@@ -1,11 +1,17 @@
# Ignore build outputs from performing a nix-build or `nix build` command
result
result-*
# Ignore automatically generated direnv output
.direnv
# Ignore NixOS interactive test driver history
**/.nixos-test-history
# Secrets
.env
# Docker data
data/
volumes/
# Temporary files
*.tmp
*.log
# Editor files
.vscode/
.idea/
# OS files
.DS_Store
+3
View File
@@ -0,0 +1,3 @@
archive.tomasrivera.ch {
reverse_proxy archivebox:8000
}
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo "Backup not configured yet"
+18
View File
@@ -15,7 +15,10 @@ apt install -y \
htop \
unzip \
rsync \
rclone \
jq \
fail2ban \
unattended-upgrades \
ufw
echo "== Installing Docker repository key =="
@@ -61,7 +64,22 @@ ufw --force enable
echo "== Enabling useful services =="
systemctl enable --now ssh
systemctl enable --now fail2ban
dpkg-reconfigure unattended-upgrades
echo "== installing systemd systems"
mkdir -p /opt/server/archivebox/archivebox-data
mkdir -p /mnt/kdrive/Archive
rclone config
mkdir -p /mnt/kdrive
cp systemd/kdrive-rclone.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable kdrive-rclone
systemctl start kdrive-rclone
mountpoint /mnt/kdrive
ls /mnt/kdrive
echo
echo "================================"
echo "Bootstrap finished!"
+36
View File
@@ -0,0 +1,36 @@
services:
caddy:
image: caddy:latest
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
archivebox:
image: archivebox/archivebox:latest
container_name: archivebox
restart: unless-stopped
environment:
- TZ=Europe/Zurich
volumes:
# Local SSD: database + config + metadata
- ./archivebox-data:/data
# kDrive: only the heavy archive content
- /mnt/kdrive/Archive:/data/archive
volumes:
caddy_data:
caddy_config:
+7
View File
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
docker compose pull
docker compose up -d
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
mkdir -p archivebox-data
docker compose run --rm archivebox init --setup
docker compose up -d
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
docker compose pull
docker compose up -d
docker image prune -f
+18
View File
@@ -0,0 +1,18 @@
[Unit]
Description=Mount kDrive with rclone
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
ExecStart=/usr/bin/rclone mount kdrive: /mnt/kdrive \
--allow-other \
--vfs-cache-mode full \
--dir-cache-time 1h
ExecStop=/bin/fusermount -u /mnt/kdrive
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target