fly-volume-mount-for-sqlite: Explicitly mount warren_data at /data in Fly config #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/fly-volume-mount-for-sqlite"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Assigned idea
The Fly deployment instructions in fly.toml rely on a persistent Fly Volume named
warren_data, and the runtime defaults tosqlite:///data/warren.dbwhenWARREN_DB_URLis not set. Make persistence deterministic by adding an explicit volume mount in fly.toml so/datais guaranteed to be backed bywarren_data(preventing accidental ephemeral SQLite state on deploys).Approach: 1) Edit
fly.tomlto add an explicit volume mount mappingwarren_datato/data(e.g., a[mounts]section withsource = "warren_data"anddestination = "/data").2) Ensure the existing
WARREN_DATA_DIR = "/data"remains aligned with the mount destination.3) (Optional but recommended) Add a short comment near the mount section that it is required when
WARREN_DB_URLis unset so operators understand why the volume is mandatory.Verification: Run
flyctl config validate -c fly.tomlto ensure the TOML is valid. Then runflyctl deploy -c fly.toml(orflyctl deploy -c fly.toml --build-onlyif you want to avoid rollout) and confirm the machine shows a mounted volume at/dataand that the app can create/persistwarren.dbacross restarts whenWARREN_DB_URLis not set.Risk: If the mount syntax is incorrect for the Fly TOML version in use, deployment will fail or
/datamay remain ephemeral. Mitigate by validating withflyctl config validateand confirming the mount in the deployed machine before relying on SQLite persistence.Agent context
Task slug: fly-volume-mount-for-sqlite
Branch: task/fly-volume-mount-for-sqlite
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.