amo
September 24, 2023, 12:06pm
1
In one of my apps I added a file to the fly.toml configuration file:
[[files]]
guest_path = "/etc/nginx/conf.d/test1.conf"
local_path = "conf.d/test1.conf"
Later on I removed that file from the fly.toml configuration file. To my surprise, after fly deploy
the file is still there in the VM.
I checked the machine using the web api (with the ruby gem) and still find this in its configuration:
{:guest_path=>"/etc/nginx/conf.d/test1.conf",
:raw_value=> "..."}
I guess that this behavior is not indended, is it? If it is, I’d add a comment somewhere in the [[files]] section of the fly.toml documentation.
Is the location on the VM the location of a mount?
I would assume that it would not persist unless you have a volume mounted.
Or the container did not VM on deployment.
I have a feeling the fly.toml
only looks at what to add, and it does not have history to understand that a path or file was removed.
In theory the vm
should not persist files unless it did not cycle or it’s on a volume.
amo
September 24, 2023, 3:03pm
3
No, it is not the location of a mount.
The file appears to persist, because the machine configuration is kept (guest_path and raw_value).
Thanks for the report, @amo . Could indeed be a flyctl bug. In the meantime, I think a workaround is to adjust Machines’ configs individually using fly machine update
:
fly machine update <machine-id> --file-local /etc/nginx/conf.d/test1.conf=""
Edit: or change your fly.toml
like so:
[[files]]
guest_path = "/etc/nginx/conf.d/test1.conf"
local_path = ""
And redeploy. I’m guessing you deleted the entire files
section, which would be intuitive but doesn’t seem to do it at the moment.
system
Closed
October 1, 2023, 3:37pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.