Skip to content

feat: continuous deployment — server restarts on new image - #2

Merged
Schroedingberg merged 1 commit into
mainfrom
autodeploy
Jul 11, 2026
Merged

feat: continuous deployment — server restarts on new image#2
Schroedingberg merged 1 commit into
mainfrom
autodeploy

Conversation

@Schroedingberg

Copy link
Copy Markdown
Owner

Adds bbledger-autodeploy.{service,timer}: every 5 minutes the server pulls ghcr.io/schroedingberg/bbledger:latest and restarts the bot only when the image digest changed. Merge → release → running on the server within ~5 minutes, no manual step.

Pull-based deliberately: CI gets no SSH key or server credentials, the server needs no inbound access beyond what it has, and it only ever runs what CI already published. A failed pull (offline, GHCR down) fails the oneshot unit visibly in the journal and the next timer tick retries.

Wired into cloud-init/main.tf like the other units (injected verbatim), so freshly provisioned VMs get it automatically; the currently running server gets the two units installed manually once.

🤖 Generated with Claude Code

A 5-minute systemd timer pulls :latest and restarts bbledger-bot only
when the image digest changed. Pull-based on purpose: CI holds no server
credentials, no inbound access needed. Units injected via cloud-init like
the rest; existing servers get them installed manually once.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Schroedingberg
Schroedingberg merged commit b6ea435 into main Jul 11, 2026
5 checks passed
@Schroedingberg
Schroedingberg deleted the autodeploy branch July 11, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant