Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

auto-update.sh

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

auto-update.shBlame29 lines · 1 contributor
f635e2fClaude1#!/usr/bin/env bash
2#
3# Fast auto-deploy for the standalone box. Installed as a ~60s systemd timer by
4# scripts/standalone-deploy.sh. Polls the deploy branch; when new commits land,
5# it pulls, rebuilds, and runs migrations. Push -> live in ~1-2 min, hands-off.
6#
7# Exits immediately (cheap) when there is nothing new, so a tight interval is fine.
8set -euo pipefail
9
10REPO_DIR="/opt/gluecron"
9de2807Claude11BRANCH="main"
f635e2fClaude12COMPOSE="docker compose -f docker-compose.standalone.yml"
13
14cd "$REPO_DIR"
15git fetch origin "$BRANCH" --quiet
16
17local_sha=$(git rev-parse HEAD)
18remote_sha=$(git rev-parse "origin/$BRANCH")
19[ "$local_sha" = "$remote_sha" ] && exit 0
20
21echo "$(date -Is) deploying $local_sha -> $remote_sha"
22git reset --hard "origin/$BRANCH" # untracked .env / backups are preserved
23
24$COMPOSE up -d --build
25sleep 5
26$COMPOSE exec -T gluecron bun run db:migrate || true
27docker image prune -f >/dev/null 2>&1 || true
28
29echo "$(date -Is) deploy complete: $remote_sha"