nandi/frqpublic Fork 0
627b785fbf6cef0c29d54b82a1ffb5e870ca9f51
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

container.toml · 46 lines · 2.0 KBTOML Blame HistoryRaw
CI builds the image, Modal serves it 5693bd5 nandi 12h ago1[container]
2name = "frq-web"
3description = "the web bundle CI built, served at a URL"
4# Nothing is built here. `registry` is an image CI already made -- the
5# Dockerfile beside this file -- and `${FRQ_WEB_IMAGE}` is expanded when this
6# spec is read, so the tag is whatever commit the deploy job is deploying.
7# Unset, it fails loudly rather than deploying something stale.
8registry = "${FRQ_WEB_IMAGE}"
The registry it pushes to is the one it has 627b785 nandi 12h ago9# Images on registry.rickub.com are private by default, so Modal needs
10# credentials to pull -- and it pulls on every cold start, not once at deploy
11# time, so the CI job's own registry token is no use: it is short-lived by
12# design. A Modal Secret of this name holds REGISTRY_USERNAME and
13# REGISTRY_PASSWORD for a rickub *deploy* token, which is pull-only by
14# construction. The username is a label of your choosing; only the token is
15# checked.
16registry_secret = "rickub-registry"
CI builds the image, Modal serves it 5693bd5 nandi 12h ago17# Not a Sandbox: a Sandbox is a run that ends, and this is meant to stay up
18# between pushes. `web` is a Function that Modal fronts with a stable https
19# URL and `modal deploy` leaves running.
20runtime = "web"
21
22[build]
23# Empty, and that is the whole point of this container: the image is already
24# what it should be. A copy here would add a layer to CI's image -- rebuilt
25# and re-pushed at deploy time -- and the tree it copied would be the
26# deploying machine's rather than the one that was built and tested.
27include = []
28
29[network]
30ports = [8000]
31
32[resources]
33# A static bundle over http.server. The cost is the pull, not the serving.
34cpu = 1
35memory = 1024
36timeout = 3600
37# One container kept warm, so the URL answers without a cold pull after a
38# quiet spell. Set it to 0 to pay that second or two instead.
39min_containers = 1
40
41[run]
42workdir = "/srv"
43# The image's own CMD, said again here because `web` starts the [run] command
44# and not the CMD: one place says what runs, and `--shell` into this
45# container gets the same line.
46command = "python3 -m http.server 8000 --directory /srv/web"