Skip to content

Fly

Terminal window
fly launch --image ghcr.io/pwnera/artbucket:1 --no-deploy --name acme-assets

Any Postgres 16 or later works: Fly’s Managed Postgres, Neon, Supabase. Make one, then hand the app its connection string:

Terminal window
fly secrets set DATABASE_URL=postgres://...

Tigris is S3-compatible and built into Fly:

Terminal window
fly storage create # sets AWS_* and BUCKET_NAME

Artbucket reads S3_*, so copy them over:

Terminal window
fly secrets set \
S3_ENDPOINT=https://fly.storage.tigris.dev \
S3_REGION=auto \
S3_BUCKET=<BUCKET_NAME> \
S3_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> \
S3_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> \
S3_FORCE_PATH_STYLE=false
Terminal window
fly secrets set \
APP_URL=https://acme-assets.fly.dev \
BETTER_AUTH_SECRET="$(openssl rand -base64 32)" \
TRUSTED_PROXIES=private
fly deploy

In fly.toml, the app listens on 3000:

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 1

Keep one machine running: the sweeper runs inside the app, every six hours.