storytellurx/mf.toml
Elias Rhouzlane 81c203c318 chore(mf): drop the retired [cache] bypass_cookie_prefixes
mf 6.5 refuses the key at build; Autokit's private answers keep signed-in pages out of the shared cache.
2026-11-01 22:11:19 +01:00

45 lines
1.7 KiB
TOML

app = "storytellurx-landing"
[build]
image = "docker.io/denoland/deno:debian-2.9.7@sha256:fa335acdf6b72106eda2cb6a8cb5f4187e7630e357467489db4b2e7352d5e432"
command = '''
set -eu
export DENO_DIR="$PWD/.deno"
# The image has no curl: fetch the same pnpm binary the Deno Deploy install used, with deno.
deno eval 'const r = await fetch("https://registry.npmjs.org/@pnpm/exe.linux-x64/-/exe.linux-x64-12.6.0.tgz"); if (!r.ok) throw new Error(String(r.status)); await Deno.writeFile("/tmp/pnpm.tgz", new Uint8Array(await r.arrayBuffer()));'
tar xzf /tmp/pnpm.tgz -C /tmp
NPM_CONFIG_USERCONFIG=.npmrc /tmp/package/pnpm install --frozen-lockfile --ignore-scripts
# Builds with vite, then the package's own prune removes node_modules and the deno cache: dist is self-contained.
deno task build:deploy
deno task deploy:prune
cat > mf-entry.ts <<'TS'
import app from "./dist/server/server.js";
Deno.serve({ hostname: "0.0.0.0", port: 8000 }, (request: Request, info: Deno.ServeHandlerInfo) => app.fetch(request, info));
TS
mkdir -p mf-output
deno compile -A --no-check --node-modules-dir=none --include dist -o mf-output/server mf-entry.ts
# Only the compiled executable is shipped.
[ "$(ls -A mf-output | wc -l)" = 1 ]
'''
output = "mf-output"
memory_mib = 4096
cpus = 2
timeout_s = 900
scratch_mib = 4096
[run]
image = "docker.io/denoland/deno:debian-2.9.7@sha256:fa335acdf6b72106eda2cb6a8cb5f4187e7630e357467489db4b2e7352d5e432"
command = ["./server"]
# The migration the Deno Deploy predeploy ran, from the shipped executable, once per revision.
[predeploy]
command = "./server db apply"
timeout_s = 300
[runtime]
memory_mib = 768
scratch_mib = 256
cpu_percent = 100
concurrent = 64
idle_minutes = 5
health_path = "/"