Thanks to @ebm for posting a discussion on how to deploy to fly.
Set the app name
and primary region
at fly.toml
.
app = "YOUR_APP_NAME"
...
primary_region = "iad"
The primary region should match your database (e.g. Supabase) region.
Create the app using fly
CLI:
fly apps create YOUR_APP_NAME
Set your secrets:
You can see the examples at .env.fly.example
.
flyctl secrets set APP_NAME=YOUR_APP_NAME \
SERVER_URL=https://YOUR_APP_NAME.fly.dev \
DOMAIN_NAME=YOUR_APP_NAME.fly.dev \
DATABASE_URL=postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{DATABASE} \
API_ACCESS_TOKEN=1234567890 \
SESSION_SECRET=abc123 \
JWT_SECRET=abc123 \
SUPABASE_API_URL= \
SUPABASE_KEY= \
SUPABASE_ANON_PUBLIC_KEY= \
STRIPE_SK= \
SUPPORT_EMAIL= \
POSTMARK_SERVER_TOKEN= \
POSTMARK_FROM_EMAIL= \
--app YOUR_APP_NAME
Deploy the app:
fly deploy
Optional: Scale
fly scale vm shared-cpu-2x --app YOUR_APP_NAME
If you don't scale enough, you may get crashes:
We respect your privacy. We respect your personal privacy.
This website uses cookies to help personalize your online experience. Learn more. This website uses cookies to help personalize your online experience. A cookie is a text file that is placed on your hard disk by a web page server. Learn more