Skip to main content
A wooden fingerpost among gum trees pointing several ways beside a trail map, in a three-ink risograph print

Your hosting access

Every full-stack repo deploys to its own app on Fly.io — use the course token to deploy within the default resource limits

You never create a Fly.io account or give the course a Fly handle. Every app is hosted in one course-managed Fly.io organisation, and the course covers billing. The sections below cover your token, deployment and the default resource limits.

On this page: your token · deploying · reading the running app · resource limits · what the course sees and pays · when it breaks

Each full-stack repo — crit 7, then the final project — gets its own app, named after the repo. The live URL of record follows from that name alone: https://<repo-name>.fly.dev/.

That name is all lowercase, whatever capitals your GitHub username carries: Fly.io takes none in an app name, so the course names these repos without them. If your checkout’s folder or the Ed message with your token shows the name with capitals, it’s the same repo — GitHub doesn’t mind either spelling, but flyctl and the URL only answer to the lowercase one.

Your token

When the repo is provisioned, the course sends an Ed Discussion message containing a token scoped to that one app, as a paste-ready block. From inside the repo checkout, paste it into a terminal:

cat > mise.local.toml <<'EOF'
[env]
FLY_API_TOKEN = "fo1_...(the token from your Ed message)"
EOF

In PowerShell:

'[env]', 'FLY_API_TOKEN = "fo1_...(the token from your Ed message)"' | Set-Content mise.local.toml

mise.local.toml is gitignored, so the token is stored alongside the repo rather than in your shell — one file per repo, available to subsequent commands with no further step. Check it from inside the repo: mise exec -- flyctl status -a <repo-name> should report the app status. mise exec -- hands flyctl the file’s token whether or not mise is active in that shell, so every flyctl command on this page runs through it.

Measured, the token can do anything to your own app — deploy, add machines, resize them, create volumes — and nothing to any other app: it can’t see another app, create an app, or mint a token. It expires at the end of semester. If it stops working, reply on the Ed message and the course issues a new one.

Deploying

While the repo is private — all of a crit week — you deploy by hand:

mise exec -- flyctl deploy --remote-only --ha=false -a <repo-name>

That builds remotely on Fly’s builders from the repo’s Dockerfile, so there’s no Docker to run locally. Hand deploys are necessary while private because CI only runs once the repo is public: GitHub Actions minutes on a private repo are metered against the whole course organisation.

At the cutoff, /comp4020:ship flips the repo public and dispatches CI; from then on, CI deploys every push to main, with a separate deploy token the course installed as a repo secret. Both paths run the same command — fly.toml in the starter says so.

Reading the running app

flyctl status -a, flyctl logs -a and flyctl ssh console -a all take your app’s name, run through mise exec -- from inside the repo. Whatever the app keeps belongs on its volume at /data, the only storage that survives restarts and redeploys. App secrets go in fly secrets set, never the repo.

Resource limits

The starter pins one shared-cpu-1x machine with 256MB, one 1GB volume, a shared IPv4, and auto-stop — the machine stops when idle and starts on the next request, which is why an app costs cents a month rather than dollars.

Fly has no spend caps of any kind, so the course runs an hourly sweep that reads every app’s machines, volumes and IP addresses and sends you an Ed message if your allocation exceeds these defaults: a bigger or second machine, a bigger or second volume, or a dedicated IPv4. The token can resize and scale, so you are responsible for staying within the defaults. They are not a hard cap; if your prototype needs more, reply and make the case.

What the course sees and pays

The teaching team can see every app and its spend on the organisation’s dashboard; you have no billing relationship with Fly. If something looks like it will cost you money, stop and ask on Ed Discussion.

When it breaks

/comp4020:doctor checks flyctl, validates your token against your repo’s app, and checks that the app is deployed and serving. Before the week 7 crit, deploy the untouched starter at its URL; the tutor checks it on the way in.