fly-volume-mount-for-sqlite: Explicitly mount warren_data at /data in Fly config #1

Open
std-bot wants to merge 1 commit from task/fly-volume-mount-for-sqlite into main
First-time contributor

Assigned idea

The Fly deployment instructions in fly.toml rely on a persistent Fly Volume named warren_data, and the runtime defaults to sqlite:///data/warren.db when WARREN_DB_URL is not set. Make persistence deterministic by adding an explicit volume mount in fly.toml so /data is guaranteed to be backed by warren_data (preventing accidental ephemeral SQLite state on deploys).

Approach: 1) Edit fly.toml to add an explicit volume mount mapping warren_data to /data (e.g., a [mounts] section with source = "warren_data" and destination = "/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_URL is unset so operators understand why the volume is mandatory.

Verification: Run flyctl config validate -c fly.toml to ensure the TOML is valid. Then run flyctl deploy -c fly.toml (or flyctl deploy -c fly.toml --build-only if you want to avoid rollout) and confirm the machine shows a mounted volume at /data and that the app can create/persist warren.db across restarts when WARREN_DB_URL is not set.

Risk: If the mount syntax is incorrect for the Fly TOML version in use, deployment will fail or /data may remain ephemeral. Mitigate by validating with flyctl config validate and 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

## Assigned idea The Fly deployment instructions in fly.toml rely on a persistent Fly Volume named `warren_data`, and the runtime defaults to `sqlite:///data/warren.db` when `WARREN_DB_URL` is not set. Make persistence deterministic by adding an explicit volume mount in fly.toml so `/data` is guaranteed to be backed by `warren_data` (preventing accidental ephemeral SQLite state on deploys). Approach: 1) Edit `fly.toml` to add an explicit volume mount mapping `warren_data` to `/data` (e.g., a `[mounts]` section with `source = "warren_data"` and `destination = "/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_URL` is unset so operators understand why the volume is mandatory. Verification: Run `flyctl config validate -c fly.toml` to ensure the TOML is valid. Then run `flyctl deploy -c fly.toml` (or `flyctl deploy -c fly.toml --build-only` if you want to avoid rollout) and confirm the machine shows a mounted volume at `/data` and that the app can create/persist `warren.db` across restarts when `WARREN_DB_URL` is not set. Risk: If the mount syntax is incorrect for the Fly TOML version in use, deployment will fail or `/data` may remain ephemeral. Mitigate by validating with `flyctl config validate` and 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 <!-- std-ts:idea-pr-body -->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/fly-volume-mount-for-sqlite:task/fly-volume-mount-for-sqlite
git switch task/fly-volume-mount-for-sqlite

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.

git switch main
git merge --no-ff task/fly-volume-mount-for-sqlite
git switch task/fly-volume-mount-for-sqlite
git rebase main
git switch main
git merge --ff-only task/fly-volume-mount-for-sqlite
git switch task/fly-volume-mount-for-sqlite
git rebase main
git switch main
git merge --no-ff task/fly-volume-mount-for-sqlite
git switch main
git merge --squash task/fly-volume-mount-for-sqlite
git switch main
git merge --ff-only task/fly-volume-mount-for-sqlite
git switch main
git merge task/fly-volume-mount-for-sqlite
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
snorkel/root-repository-maintenance-49850203909049!1
No description provided.