Hi… This recent post on cross-application LiteFS sharing might be relevant as background reading:
https://community.fly.io/t/litefs-multiple-databases/15595/18
At a minimum, it will provide a functioning example of how advertise-url
meshes.
Also, I don’t think your RUN litefs import
can be made to work out, in the end.
As a general rule, you can’t do database operations in the Dockerfile. The builder has access neither to the volume nor to the members of the cluster, after all.
If data.db
is an existing, third SQLite file that you want inlaid in LITEFS_DIR
for use by the webscraper, then manually SSH into the current, running primary (within the “This is working fine” machine fleet) and litefs import
it there. Any node created subsequently will automatically get a full copy from the primary, as part and parcel of its litefs mount
.
(You’ll be able to see this happening in fly logs
on the existing replicas, as well.)
Hope this helps a little!