Fix fly-deploy WARNING by starting nginx before Tailscale #128

Merged
eblume merged 1 commit from fix/fly-deploy-warnings into main 2026-02-09 07:01:59 -08:00
Owner

Summary

  • Start nginx before Tailscale in start.sh so port 8080 is bound immediately, eliminating the "app is not listening on the expected address" WARNING during fly deploy
  • Switch proxy_pass to use a variable with resolver 100.100.100.100 valid=30s so nginx can start without resolving MagicDNS names at config load time
  • DNS results cached 30s per worker — no per-request lookup overhead

Context

The WARNING was a race condition: Fly checks for listeners right after the machine starts, but start.sh ran ~5-10s of Tailscale setup before starting nginx. The health check always passed later, but the warning was noisy.

Test plan

  • Merge and let the deploy-fly workflow trigger
  • Check runner logs for absence of the WARNING
  • Verify docs.eblu.me still serves correctly
  • Verify /healthz still passes
## Summary - Start nginx before Tailscale in `start.sh` so port 8080 is bound immediately, eliminating the "app is not listening on the expected address" WARNING during `fly deploy` - Switch `proxy_pass` to use a variable with `resolver 100.100.100.100 valid=30s` so nginx can start without resolving MagicDNS names at config load time - DNS results cached 30s per worker — no per-request lookup overhead ## Context The WARNING was a race condition: Fly checks for listeners right after the machine starts, but `start.sh` ran ~5-10s of Tailscale setup before starting nginx. The health check always passed later, but the warning was noisy. ## Test plan - [ ] Merge and let the deploy-fly workflow trigger - [ ] Check runner logs for absence of the WARNING - [ ] Verify `docs.eblu.me` still serves correctly - [ ] Verify `/healthz` still passes
The deploy WARNING ("app is not listening on the expected address") was
caused by a race: start.sh ran Tailscale setup (~5-10s) before starting
nginx, so Fly's post-start socket check found nothing on port 8080.

Fix by starting nginx first and deferring upstream DNS resolution to
request time via resolver + variable in proxy_pass. DNS results are
cached for 30s per worker to avoid per-request lookups.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eblume merged commit c6f8fcd346 into main 2026-02-09 07:01:59 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eblume/blumeops!128
No description provided.