Skip to content

Drift deploy v0.1.61

Choose a tag to compare

@kidproquo kidproquo released this 25 Jun 17:39
· 14 commits to main since this release

v0.1.61

Cleanup + two small but load-bearing fixes:

  1. nginx default_server fix — without it, the tunnel-* server block I added in v0.1.59 became nginx's implicit default for any non-matching Host header, so requests with Host: localhost (the wget healthcheck) or any unexpected host got proxied to drift-agent and returned {"detail":"Not Found"} (404). drift-frontend showed unhealthy. The SPA catchall block is now explicitly marked listen 80 default_server.

  2. install.sh generates TUNNEL_BASE_DOMAIN — defaults to $DOMAIN (the public-URL host), so the tunnel feature is half-configured out of the box on fresh installs. Operators still need to add wildcard DNS + a Caddy block (or render their bundled-Caddy equivalent), but the snippet to paste is printed by install.sh at the end of the run in external-proxy mode, with $DOMAIN and $DRIFT_HOST_PORT already substituted.

  3. Repo .env + dev docker-compose.yml deleted — they duplicated deploy/'s, drifted out of sync, and bit prod twice (v0.1.58 cross-project recreation; v0.1.60 stale Software Updates Apply). The runtime .env lives ONLY at /var/lib/drift-cp/.env (generated by install.sh); local backend dev still uses drift-agent/.env; local frontend dev still uses .env.local. Removed:

    • docker-compose.yml (repo root)
    • .env.example (repo root)
    • deploy/.env.example
    • deploy/Caddyfile.tunnel-example.snippet (moved into install.sh's post-install summary)

    Docs (README.md, ARCHITECTURE.md, CLAUDE.md) updated to reflect.

Why

Three problems compounded over the last week:

  • One outage per .env ambiguity — when there were three "authoritative" .env files (repo root, deploy/, runtime), the wrong one always seemed to be the one I edited. v0.1.58 + v0.1.60 outages were both this. The fix isn't process discipline; it's removing the ambiguous files.
  • Tunnel feature was painful to enable — DNS, Caddy, .env all manual. v0.1.61 doesn't fully automate Caddy (that's host-side) but the .env line is now generated and the Caddy snippet is printed pre-filled.
  • Silent nginx 404 — tunnel-* server block hijacked the implicit default. Real bug; just hadn't surfaced for /drift/ paths during testing because the public probe went through Caddy with the right Host header.

Operator action

Apply via Software Updates modal as usual. No env changes required for existing installs (already-set TUNNEL_BASE_DOMAIN is preserved; the install.sh default only affects fresh runs).

Migration / breaking changes

None for prod installs. If you had been using the repo-root docker compose up --build path for local stack testing, that's gone — use deploy/install.sh or run backend + frontend separately for dev (Option B in README).

Cache impact

No system prompt or tool registry changes.