feat: continuous deployment — server restarts on new image - #2
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
bbledger-autodeploy.{service,timer}: every 5 minutes the server pullsghcr.io/schroedingberg/bbledger:latestand 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