| CI builds the image, Modal serves it 5693bd5 nandi 15h ago | 1 | # `web` |
| 2 | |
| The registry it pushes to is the one it has 627b785 nandi 14h ago | 3 | FRQ_WEB_IMAGE=registry.rickub.com/nandi/frq-web:<sha> \ |
| The web container is plain Modal bd10e81 nandi 14h ago | 4 | modal deploy .modal/web/app.py |
| CI builds the image, Modal serves it 5693bd5 nandi 15h ago | 5 | |
| The web container is plain Modal bd10e81 nandi 14h ago | 6 | Plain Modal, in `app.py`. There is no `container.toml` here and no |
| 7 | `_loader.py` behind it: `dev` has a spec because it is a sandbox |
| 8 | with a volume, a toolchain and a command that changes, and this is |
| 9 | four constants and a `Popen`. |
| CI builds the image, Modal serves it 5693bd5 nandi 15h ago | 10 | |
| The registry it pushes to is the one it has 627b785 nandi 14h ago | 11 | Unlike `dev`, this container builds nothing. rickub builds the image |
| 12 | -- `Dockerfile` here, two stages, the second one just the bundle and |
| 13 | a python -- and pushes it to `registry.rickub.com`; this deploys that |
| CI builds the image, Modal serves it 5693bd5 nandi 15h ago | 14 | exact tag. So the thing served is the thing that was built and |
| The registry it pushes to is the one it has 627b785 nandi 14h ago | 15 | tested, and a deploy is a pull rather than a compile. The workflow is |
| 16 | `.rickub/workflows/web.yml`. |
| CI builds the image, Modal serves it 5693bd5 nandi 15h ago | 17 | |
| The web container is plain Modal bd10e81 nandi 14h ago | 18 | `@modal.web_server`: a Function whose command listens on a port, |
| 19 | fronted by a stable https URL. Modal waits for the port to accept a |
| 20 | connection and then proxies to it, which is why the command is a |
| 21 | `Popen` that keeps running rather than a `run` that finishes. |
| 22 | `modal deploy` leaves it up, and deploying again replaces it in |
| 23 | place because `modal.App("frq-web")` names it. |
| CI builds the image, Modal serves it 5693bd5 nandi 15h ago | 24 | |
| Nothing to guard, so no credential to keep 5581b0f nandi 14h ago | 25 | One credential and one setting live outside the repo, both one-time: |
| CI builds the image, Modal serves it 5693bd5 nandi 15h ago | 26 | |
| The registry it pushes to is the one it has 627b785 nandi 14h ago | 27 | * `MODAL_TOKEN_ID` / `MODAL_TOKEN_SECRET`, as rickub repository |
| Nothing to guard, so no credential to keep 5581b0f nandi 14h ago | 28 | secrets. The registry needs none of its own -- rickub authenticates |
| 29 | docker before a workflow's first step. |
| 30 | * The image set to **public** on rickub: its detail page, Manage, |
| 31 | visibility. Private is the default, and the first push creates it |
| 32 | private, so this is done once after the first green run. |
| The registry it pushes to is the one it has 627b785 nandi 14h ago | 33 | |
| The web container is plain Modal bd10e81 nandi 14h ago | 34 | The second is why `from_registry` is called without a `secret`. |
| Nothing to guard, so no credential to keep 5581b0f nandi 14h ago | 35 | Modal pulls on every cold start rather than once at deploy time, so a |
| 36 | private image would want a long-lived rickub deploy token held as a |
| 37 | Modal Secret -- and what it would be guarding is `build/web`, which |
| 38 | the URL hands to anyone who opens it. The alternative is written down |
| The web container is plain Modal bd10e81 nandi 14h ago | 39 | in `app.py` for whoever wants it. |