Skip to content

Hardening plan 1 - #1

Merged
JonTelep merged 20 commits into
mainfrom
hardening-plan-1
Jul 11, 2026
Merged

JonTelep merged 20 commits into
mainfrom
hardening-plan-1

Conversation

@JonTelep

@JonTelep JonTelep commented Jul 8, 2026

Copy link
Copy Markdown
Member

No description provided.

JonTelep and others added 20 commits July 7, 2026 19:37
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add State.History recording past releases; prune images per
keep_releases while containers stay limited to current+previous.
Clamp keep_releases < 1 to 1 on load.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
RouteDNS now only treats an existing record as success when its CNAME
already points at this tunnel; doctor verifies the CNAME target for
tunneled apps with a resolve-only fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Restart now starts the replacement on a fresh port, health-checks it,
switches Caddy, then retires the old container. Any failure leaves the
current release running and restores the Caddy site file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add fsutil.WriteFileAtomic (temp file + fsync + rename) and use it in
SaveState, App.Save, Config.Save, and SetEnv so a crash or full disk
cannot corrupt seploy's on-disk state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add app.FindByDomain and app.NormalizeDomain; runNew re-prompts on
duplicates and implausible domains, and the webhook handler reuses
FindByDomain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add app.AcquireLockWait and a hidden --wait-lock flag on deploy; the
webhook runner passes --wait-lock=10m so pushes arriving during a
manual deploy are no longer dropped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
If a container with the target name is running but untracked in
state.json, start the replacement under a suffixed name and warn
instead of force-removing the live release.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Downloads are pinned to cloudflared 2026.6.1 and verified against the
SHA256 digests Cloudflare publishes in the release notes before the
binary is installed. New command: seploy tunnel upgrade.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
WriteConfig copies cert.pem and the tunnel credentials into
/etc/cloudflared and points the service there; account-level
cloudflared commands set TUNNEL_ORIGIN_CERT so tunnel operations no
longer depend on the login user's home directory.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New app.toml field health_timeout (Go duration, default 30s) drives
the health-check deadline; the no-healthcheck path now requires an
accepted TCP connection instead of just a running process.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…p (Task 2.5)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
State.json now records the intended end state before the Caddy switch;
on a failed switch the pre-switch state and site file are restored and
the error says traffic was not switched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add netcheck.CheckEdge (HTTPS reachability with DNS/TLS/connection/5xx
classification and per-class hints); deploy prints an edge line or a
warning without failing the deploy, and doctor gains a per-app edge
check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
seploy tunnel setup --token (or SEPLOY_TUNNEL_TOKEN) installs a
remotely-managed tunnel with no browser login. Mode is recorded in
/etc/cloudflared/seploy-tunnel.toml; token mode prints dashboard
Public Hostname instructions instead of calling RouteDNS, and doctor
and tunnel status are mode-aware.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rollback can target any release recorded in History via exact SHA or
unambiguous prefix, with a guard against targeting the current
release. New command: seploy releases <app>. Common switch logic is
factored into switchToRelease shared by both rollback paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploy aborts before building when the Docker data root has under
2 GiB free; docker build is context-bounded by the new app.toml
build_timeout field (default 30m).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
docker.Build now takes a BuildOpts struct with a NoCache option;
deploy --all redeploys every app sequentially, continuing past
failures and summarizing at the end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@JonTelep
JonTelep merged commit febe0c1 into main Jul 11, 2026
1 check passed
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