Skip to content

Add Dockerfile + fly.toml for single-host Fly deploy#34

Merged
dougdevitre merged 1 commit into
mainfrom
claude/add-fly-config
May 16, 2026
Merged

Add Dockerfile + fly.toml for single-host Fly deploy#34
dougdevitre merged 1 commit into
mainfrom
claude/add-fly-config

Conversation

@dougdevitre
Copy link
Copy Markdown
Owner

Summary

Adds Dockerfile, fly.toml, and .dockerignore so the voice center can be deployed single-host to Fly.io (HTTP + WebSocket both on one machine).

  • Dockerfile — multi-stage Node 20 alpine build. Compiles TS in the build tier, ships only dist/ + production node_modules to a slim runtime image. tini forwards signals so Twilio WebSockets shut down cleanly on Fly redeploys.
  • fly.toml — one always-on shared-cpu-1x / 512MB machine in ord. auto_stop_machines = false because voice calls can't tolerate cold starts. Health check hits /health every 30s.
  • .dockerignore — keeps the build context small.

Deploy steps (from CloudShell, after merge)

cd ~/cotrackpro-talk
git pull
fly auth login                          # or set FLY_API_TOKEN env var
fly apps create cotrackpro-talk
FLY_APP_NAME=cotrackpro-talk ./scripts/sync-ssm-to-vercel.sh --target fly
fly secrets set SERVER_DOMAIN=cotrackpro-talk.fly.dev -a cotrackpro-talk
fly deploy

Test plan

  • CI green
  • After merge: fly deploy produces a live machine
  • curl https://cotrackpro-talk.fly.dev/health returns 200
  • Twilio webhook update → dial test for +1 314-394-8500

Generated by Claude Code

Multi-stage Dockerfile compiles TypeScript in a build tier then ships
only dist/ + production node_modules to a slim runtime image. tini
handles signal forwarding so WebSocket sessions close cleanly when
Fly redeploys.

fly.toml runs both the HTTP webhook and the Twilio Media Stream WS
on one always-on shared-cpu machine. auto_stop_machines is off
because voice calls can't tolerate the cold-start delay scale-to-
zero introduces. Health check hits /health every 30s.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cotrackpro-talk Ready Ready Preview, Comment May 16, 2026 6:13am

Request Review

@dougdevitre dougdevitre merged commit b759198 into main May 16, 2026
3 checks 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.

2 participants