Homework — prove ephemerality, break a guard
Ship your own. Deploy your app (or your SignFlow fork) to Railway, or work through these on the reference deploy.
-
Prove ephemerality is real. On a service with no Volume (or with
UPLOAD_DIRpointing at the container disk), upload a file, redeploy, and try to download it. It's gone. Then attach the Volume, repeat, and watch it survive. Write two sentences on why thestorage.Storeinterface made this a config decision, not a code change. -
Read the image. Run
docker build -t signflow .locally, thendocker history signflow(or check the image size). Notice how little is in the final layer. Explain whatCGO_ENABLED=0and the distroless base each contribute, and why embedding the migrations matters for a self-migrating deploy. -
Break a guard, watch it refuse. Deploy with
APP_ENV=prodbut omitBASE_URL. The app won't boot. Read the exact error. Now setAPP_ENV=devwith the same missing var — it boots (with a localhost default). Explain why refusing in prod but defaulting in dev is the right split. -
Plan the object-storage swap. You will not implement it, but sketch it: which single file changes to add an
S3Storeimplementingstorage.Store, what stays untouched (every handler), and why a Volume was the right first choice but object storage is what you'd reach for at multiple instances. This is the interface from lesson 8 paying off.
Next lesson is the payoff of the whole curriculum: you have now built authentication two completely different ways — a JWT in Pica, a session cookie here — and you can finally feel why the answer differs.