Deployment
Fly.io
Deploy Repix to Fly.io for global edge deployment.
Fly.io runs containers globally. Repix's Dockerfile works with minimal configuration.
Prerequisites
Install the Fly CLI:
# macOS / Linux
curl -L https://fly.io/install.sh | sh
# Or with Homebrew
brew install flyctl
Log in:
fly auth login
Deploy Steps
1. Launch the App
From your repix repository:
cd repix
fly launch
During setup:
- App name:
repixor custom - Region: Pick primary region (e.g.,
iadfor US East) - Postgres/Redis: No (press Enter to skip)
- Deploy now: Yes
2. Configure fly.toml
The generated fly.toml should work. Ensure the port matches:
# fly.toml
app = "repix"
[build]
[env]
NODE_ENV = "production"
PORT = "3210"
[[services]]
internal_port = 3210
protocol = "tcp"
[[services.ports]]
port = 80
handlers = ["http"]
[[services.ports]]
port = 443
handlers = ["tls", "http"]
[services.concurrency]
type = "requests"
hard_limit = 25
soft_limit = 20
[[services.http_checks]]
interval = "30s"
timeout = "5s"
path = "/health"
3. Set Secrets (Optional)
fly secrets set SOURCE_PREFIX=https://
fly secrets set IMAGE_MAX_WIDTH=2048
fly secrets set IMAGE_MAX_HEIGHT=2048
4. Deploy
fly deploy
Your app is at:
https://repix.fly.dev
Custom Domain
fly certs add images.yourdomain.com
Add a CNAME record pointing to repix.fly.dev.
Scaling
# Scale to 2 instances
fly scale count 2
# Use a larger machine for image processing
fly scale vm shared-cpu-2x
Health Check
Fly uses the path = "/health" in http_checks. Repix's /health endpoint satisfies this.

