Skip to content

Latest commit

 

History

History
57 lines (37 loc) · 1.08 KB

README.md

File metadata and controls

57 lines (37 loc) · 1.08 KB

Tier on Fly.io

This repository provisions tier on fly.io as a private service

Setup

Create an app out of this template.

fly launch --no-deploy

Then we set the Stripe API key secret.

fly secrets set STRIPE_API_KEY=sk_live_...

Then we deploy it.

fly deploy

The app is now available internally at http://<app>.internal/.

Enable public-facing access

Be very mindful about enabling public-facing access as anyone who has access to its URL can issue any command to Tier.

First, you have to allocate an IP address.

# use --shared if you donʻt want to pay $2 for a dedicated IPv4
fly ips allocate-v4 [--shared]
fly ips allocate-v6

# redeploy
fly deploy

Enable scale-to-zero in private networking

You need to use Flycast to achieve this.

# allocate a private ipv6
fly ips allocate-v6 --private

# deploy app
fly deploy

# access app via ip
curl http://[ipv6]/v1/whomai

You can now update the minimum machines needed by setting min_machines_running = 0