From dd46047f20645639ac957747205c6143af6a7681 Mon Sep 17 00:00:00 2001 From: jdtw Date: Fri, 31 Jul 2026 22:47:12 -0700 Subject: [PATCH] Declare the SQLite volume mount in fly.toml The app now reads its database from the path in the SQLITE_PATH secret, which points into /data. That directory only exists because a volume is mounted there, and the mount was applied by hand rather than through config -- so a deploy from a clean checkout would come up with no /data, fail to open the database, and exit. There is no longer a Postgres instance to fall back to, so that failure would be a full outage. Also correct primary_region, which said sea while the machine and its volume are both in sjc. Volumes cannot attach across regions, so the stale value is the same trap: it would place a machine where no volume exists. Co-Authored-By: Claude Opus 5 --- fly.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fly.toml b/fly.toml index c5f7ae8..80f18d1 100644 --- a/fly.toml +++ b/fly.toml @@ -4,7 +4,7 @@ # app = "jdtw" -primary_region = "sea" +primary_region = "sjc" kill_signal = "SIGINT" kill_timeout = "5s" @@ -14,6 +14,13 @@ kill_timeout = "5s" [env] SKEW = "5s" +# Backing store for the SQLite database named by the SQLITE_PATH secret. +# The volume lives in sjc, matching the machine; a volume in another region +# cannot attach. +[[mounts]] + source = "links_data" + destination = "/data" + [[services]] protocol = "tcp" internal_port = 8080