nandi/frqpublic Fork 0
5693bd54d43c2a63f33ffe43d67bc4909e271eb3
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.

CI builds the image, Modal serves it 5693bd5 · on 5693bd54d43c2a63f33ffe43d67bc4909e271eb3 · nandi · 9h ago
container.toml · 42 lines · 1.7 KBTOML Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[container]
name        = "frq-web"
description = "the web bundle CI built, served at a URL"
# Nothing is built here. `registry` is an image CI already made -- the
# Dockerfile beside this file -- and `${FRQ_WEB_IMAGE}` is expanded when this
# spec is read, so the tag is whatever commit the deploy job is deploying.
# Unset, it fails loudly rather than deploying something stale.
registry    = "${FRQ_WEB_IMAGE}"
# The GitLab container registry is private, so Modal needs credentials to
# pull. A Modal Secret of this name holding REGISTRY_USERNAME and
# REGISTRY_PASSWORD -- a GitLab deploy token with `read_registry` is enough.
registry_secret = "gitlab-registry"
# Not a Sandbox: a Sandbox is a run that ends, and this is meant to stay up
# between pushes. `web` is a Function that Modal fronts with a stable https
# URL and `modal deploy` leaves running.
runtime     = "web"

[build]
# Empty, and that is the whole point of this container: the image is already
# what it should be. A copy here would add a layer to CI's image -- rebuilt
# and re-pushed at deploy time -- and the tree it copied would be the
# deploying machine's rather than the one that was built and tested.
include = []

[network]
ports = [8000]

[resources]
# A static bundle over http.server. The cost is the pull, not the serving.
cpu     = 1
memory  = 1024
timeout = 3600
# One container kept warm, so the URL answers without a cold pull after a
# quiet spell. Set it to 0 to pay that second or two instead.
min_containers = 1

[run]
workdir = "/srv"
# The image's own CMD, said again here because `web` starts the [run] command
# and not the CMD: one place says what runs, and `--shell` into this
# container gets the same line.
command = "python3 -m http.server 8000 --directory /srv/web"