Files
ops/deploy.sh
Spencer c93dcb5daf 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
2026-03-04 14:42:46 -05:00

25 lines
599 B
Bash

#!/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