Hi, I have created a volume and change my config to make assets persistant after a redeploy.
So I’ve added those lines to my
And this is my
root: <%= Rails.root.join("tmp/storage") %>
root: <%= Rails.root.join("storage") %>
root: <%= Rails.root.join("/storage") %>
But when I redeploy my app, images disapeer.
Do you have any clue?
You likely have the following in your
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
Change that to
:production, or change your
config/storage.yml to point local to /storage.
I’ve replaced “storage” by “data” just like in the documentation and it’s working now.
fly.toml is relative to the root path.
config/storage.yml is relative to app root.
It should be a path mismatch.
join does the right thing here:
% rails console
Loading development environment (Rails 7.0.4)