feat(homelab): move traefik to rufus node, add rfc1918 middlewares

This commit is contained in:
2025-12-27 02:20:41 -08:00
parent 037036a684
commit 402f1243a2
11 changed files with 144 additions and 69 deletions

View File

@@ -70,48 +70,48 @@ extraVolumes:
server: 192.168.27.2
path: /backup/minecraft
initContainers:
- name: world-restore
image: busybox:latest
command:
- sh
- -c
- |
set -e
echo "=== Minecraft World Restore ==="
BACKUP_FILE="/backups/latest.tgz"
# Check if backup exists
if [[ ! -f "$BACKUP_FILE" ]]; then
echo "Skipping restore, server will start with existing/new world"
exit 0
fi
echo "✓ Backup found: $BACKUP_FILE"
echo " Size: $(du -h $BACKUP_FILE | cut -f1)"
# Check if world already exists
if [ -f /data/world/level.dat ]; then
echo "⚠ World already exists at /data/world/"
echo " Replacing with backup..."
rm -rf /data/world /data/world_nether /data/world_the_end
fi
# Extract backup
echo "Extracting backup to /data/..."
tar -xzf "$BACKUP_FILE" -C /data/
echo "✓ Extraction complete"
echo ""
echo "=== Restore Complete ==="
echo "Restored world size: $(du -sh /data/world 2>/dev/null | cut -f1 || echo 'unknown')"
ls -lh /data/ | grep -E "^d" || true
echo ""
volumeMounts:
- name: datadir
mountPath: /data
- name: backup-volume
mountPath: /backup
readOnly: true
# initContainers:
# - name: world-restore
# image: busybox:latest
# command:
# - sh
# - -c
# - |
# set -e
#
# echo "=== Minecraft World Restore ==="
#
# BACKUP_FILE="/backups/latest.tgz"
#
# # Check if backup exists
# if [[ ! -f "$BACKUP_FILE" ]]; then
# echo "Skipping restore, server will start with existing/new world"
# exit 0
# fi
#
# echo "✓ Backup found: $BACKUP_FILE"
# echo " Size: $(du -h $BACKUP_FILE | cut -f1)"
#
# # Check if world already exists
# if [ -f /data/world/level.dat ]; then
# echo "⚠ World already exists at /data/world/"
# echo " Replacing with backup..."
# rm -rf /data/world /data/world_nether /data/world_the_end
# fi
#
# # Extract backup
# echo "Extracting backup to /data/..."
# tar -xzf "$BACKUP_FILE" -C /data/
# echo "✓ Extraction complete"
#
# echo ""
# echo "=== Restore Complete ==="
# echo "Restored world size: $(du -sh /data/world 2>/dev/null | cut -f1 || echo 'unknown')"
# ls -lh /data/ | grep -E "^d" || true
# echo ""
# volumeMounts:
# - name: datadir
# mountPath: /data
# - name: backup-volume
# mountPath: /backup
# readOnly: true