Fix fly-deploy WARNING by starting nginx before Tailscale #128
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/fly-deploy-warnings"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
start.shso port 8080 is bound immediately, eliminating the "app is not listening on the expected address" WARNING duringfly deployproxy_passto use a variable withresolver 100.100.100.100 valid=30sso nginx can start without resolving MagicDNS names at config load timeContext
The WARNING was a race condition: Fly checks for listeners right after the machine starts, but
start.shran ~5-10s of Tailscale setup before starting nginx. The health check always passed later, but the warning was noisy.Test plan
docs.eblu.mestill serves correctly/healthzstill passesThe 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>