Add initial infrastructure and backup scripts for Gitea and homelab deployment

- Create README.md with project layout and quick start instructions
- Implement backup scripts for Gitea, including database and repository exports
- Add systemd service and timer for automated Gitea backups
- Develop bootstrap scripts for homelab and VPS setup
- Document architecture and restore procedures
- Configure Caddy reverse proxy and Docker Compose for service management
- Establish secrets management guidelines
This commit is contained in:
2026-03-04 14:42:46 -05:00
commit c93dcb5daf
21 changed files with 531 additions and 0 deletions

24
deploy.sh Normal file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ "$#" -eq 0 ]]; then
echo "Usage: $0 <stack> [stack...]"
echo "Example: $0 gitea kuma"
exit 1
fi
for stack in "$@"; do
stack_dir="/srv/ops/stacks/$stack"
if [[ ! -d "$stack_dir" ]]; then
echo "Skipping unknown stack: $stack"
continue
fi
if [[ -f "$stack_dir/.env.example" && ! -f "$stack_dir/.env" ]]; then
cp "$stack_dir/.env.example" "$stack_dir/.env"
echo "Created $stack_dir/.env from .env.example; fill secrets before production"
fi
echo "Deploying stack: $stack"
(cd "$stack_dir" && docker compose up -d)
done