chore: Fix trailing whitespace across project files

Automated fix from pre-commit hooks (trailing-whitespace, end-of-file-fixer).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 12:45:32 +01:00
parent 654e03dc71
commit 1637782273
15 changed files with 61 additions and 61 deletions
+28 -28
View File
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Deploy Gitea Stack to Bigbox with 1Password Secrets Management
#
#
# Prerequisites:
# - SSH access to bigbox configured
# - 1Password CLI installed locally and on bigbox
@@ -53,50 +53,50 @@ echo ""
echo -e "${YELLOW}Step 2: Verifying bigbox prerequisites...${NC}"
ssh "$BIGBOX" << 'CHECKSCRIPT'
set -e
# Check Docker
if ! command -v docker &> /dev/null; then
echo "Error: Docker not installed"
exit 1
fi
# Check Docker Compose
if ! docker compose version &> /dev/null; then
echo "Error: Docker Compose not installed"
exit 1
fi
# Check 1Password CLI
if ! command -v op &> /dev/null; then
echo "Error: 1Password CLI not installed"
exit 1
fi
# Check service account script
if [ ! -f "$HOME/op_zesticai_non_prod.sh" ]; then
echo "Error: op_zesticai_non_prod.sh not found in home directory"
exit 1
fi
# Test 1Password authentication
source "$HOME/op_zesticai_non_prod.sh"
if ! op vault list &> /dev/null; then
echo "Error: 1Password authentication failed"
exit 1
fi
# Check Caddy is running
if ! pgrep -x caddy > /dev/null; then
echo "Error: Caddy is not running"
exit 1
fi
# Check Caddy admin API is accessible
if ! curl -s http://localhost:2019/config/ > /dev/null; then
echo "Error: Caddy admin API is not accessible"
exit 1
fi
echo "All prerequisites verified"
CHECKSCRIPT
@@ -128,28 +128,28 @@ echo -e "${YELLOW}Step 4: Injecting secrets and starting services...${NC}"
ssh "$BIGBOX" << DEPLOYSCRIPT
set -e
cd $REMOTE_DIR
echo "Loading 1Password credentials..."
source ~/op_zesticai_non_prod.sh
echo "Injecting secrets into docker-compose.yml..."
op inject --in-file docker-compose.yml.template --out-file docker-compose.yml
echo "Injecting secrets into s3_config.json..."
op inject --in-file s3_config.json.template --out-file s3_config.json
echo "Creating data directories..."
mkdir -p gitea postgres seaweedfs seaweedfs_filter prometheus
echo "Setting permissions..."
chmod -R 1000:1000 gitea 2>/dev/null || sudo chown -R 1000:1000 gitea 2>/dev/null || true
echo "Starting services with Docker Compose..."
docker compose up -d
echo "Waiting for services to start..."
sleep 30
echo "Service status:"
docker compose ps
DEPLOYSCRIPT
@@ -161,10 +161,10 @@ echo ""
echo -e "${YELLOW}Step 5: Adding Gitea route to Caddy...${NC}"
ssh "$BIGBOX" << CADDYSCRIPT
set -e
echo "Creating log directory..."
sudo mkdir -p /var/log/caddy
echo "Adding Gitea route to Caddy via Admin API..."
curl -s -X POST http://localhost:2019/config/apps/http/servers/srv0/routes \
-H "Content-Type: application/json" \
@@ -182,7 +182,7 @@ ssh "$BIGBOX" << CADDYSCRIPT
}],
"terminal": true
}'
# Verify route was added
if curl -s http://localhost:2019/config/apps/http/servers/srv0/routes | grep -q "git.terraphim.cloud"; then
echo "✓ Gitea route added successfully to Caddy"
@@ -199,49 +199,49 @@ echo -e "${YELLOW}Step 6: Verifying deployment...${NC}"
ssh "$BIGBOX" << VERIFYSCRIPT
set -e
cd $REMOTE_DIR
echo ""
echo "=== Service Health Checks ==="
# Check Gitea (direct)
if curl -s -o /dev/null -w '%{http_code}' http://localhost:3000/api/healthz | grep -q "200"; then
echo "✓ Gitea is healthy (localhost:3000)"
else
echo "✗ Gitea is not responding"
fi
# Check S3 (Tailscale)
if curl -s http://${TAILSCALE_IP}:8333 > /dev/null 2>&1; then
echo "✓ SeaweedFS S3 is responding (${TAILSCALE_IP}:8333)"
else
echo "✗ SeaweedFS S3 is not responding"
fi
# Check Prometheus (Tailscale)
if curl -s http://${TAILSCALE_IP}:9000/-/healthy > /dev/null 2>&1; then
echo "✓ Prometheus is healthy (${TAILSCALE_IP}:9000)"
else
echo "✗ Prometheus is not responding"
fi
# Check SSH port
if nc -zv localhost 222 2>&1 | grep -q succeeded; then
echo "✓ SSH port is open (port 222)"
else
echo "✗ SSH port is not responding"
fi
# Check Caddy
if pgrep -x caddy > /dev/null; then
echo "✓ Caddy is running"
else
echo "✗ Caddy is not running"
fi
echo ""
echo "=== Container Status ==="
docker compose ps
echo ""
echo "=== Recent Logs ==="
docker compose logs --tail=10