Files
Stephen M AbbottandClaude Fable 5 fc2faf8b22 Droplet deployment: server image + compose stack with auto-update
- Dockerfile.server: python:3.12-slim + FastAPI app + web UI, non-root,
  SQLite in /data volume, container healthcheck against /api/health,
  uvicorn with proxy headers for running behind Caddy
- docker.yml workflow now publishes both images (matrix):
  ghcr.io/stevologic/spare-cycles (node) and spare-cycles-server (pool)
- deploy/: docker-compose.yml (server + Caddy auto-HTTPS + Watchtower
  pulling latest every 5 min, restart: unless-stopped throughout),
  Caddyfile (DOMAIN set -> Let's Encrypt; empty -> plain :80),
  .env.example, setup-droplet.sh (idempotent bootstrap: Docker install,
  ufw, stack files, .env, pull + up -d), update.sh (manual pull+up)
- DEPLOY.md: compose is now Option A with a one-command bootstrap;
  bare-metal systemd demoted to Option B; volume-safe backup recipe
- README: production deploy one-liner + deploy/ in the repo map

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 13:35:38 -07:00

10 lines
293 B
Bash

#!/usr/bin/env bash
# Manual update of the SpareCycles stack (Watchtower normally does this for
# you every 5 minutes): pull the latest images, restart what changed, prune.
set -euo pipefail
cd "$(dirname "$0")"
docker compose pull
docker compose up -d
docker image prune -f
docker compose ps