tl/fly.toml

33 lines
1 KiB
TOML
Raw Normal View History

# Fly.io — one machine, scale to zero, SQLite on a volume, video on R2.
# `app` is set by `fly launch`. After launch, set secrets (see DEPLOY.md) and:
# fly deploy
app = "lumet"
primary_region = "iad"
[build]
dockerfile = "Dockerfile"
[env]
DJANGO_DEBUG = "0"
DJANGO_ALLOWED_HOSTS = ".fly.dev"
DJANGO_DB_PATH = "/data/db.sqlite3"
# also set DJANGO_CSRF_TRUSTED="https://<your-app>.fly.dev" (secret or env) for admin
[http_service]
internal_port = 8000
force_https = true
auto_stop_machines = "stop" # extra machines can still scale to zero
auto_start_machines = true # wake on the next request
min_machines_running = 1 # keep one VM always up: background thumbnail
# jobs outlive any HTTP request, so scale-to-zero
# would let the proxy reap the VM mid-job.
[[vm]]
size = "shared-cpu-1x"
memory = "512mb"
# SQLite + uploads scratch live here (survives machine stop/start)
[[mounts]]
source = "data"
destination = "/data"