feat: moved gitea terraform to this repository

This commit is contained in:
2025-01-11 22:39:30 -05:00
parent 88b8e2e7d2
commit 895650a89e
19 changed files with 423 additions and 0 deletions

23
image/scripts/push.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
set -e
GITEA_PROCESS="$(pgrep gitea)"
# Stop Gitea.
echo "Stopped Gitea..."
kill -STOP "$GITEA_PROCESS"
# Archive Gitea data.
echo "Archiving..."
cd /var/lib/gitea
tar cfJ ../archive.tar.xz .
cd ..
# Upload to S3.
echo "Uploading..."
aws s3 cp archive.tar.xz "$BOOT_URI"
# Restart Gitea.
kill -CONT "$GITEA_PROCESS"
echo "Restarted Gitea!"