Good day to everyone, I am new to fly io and I am having issues with my deployment. I’m using Docker and I also have a fly.toml
file. I’m trying to deploy and attach a volume to my machine but everytime I deploy the volume is not attached. I ssh into the machine using fly console and when I check the mount point at /data
for my data, the directory is not there. On top of that every time I deploy, docker clones my git repo as part of my deployment, this is not a problem as I have specified this in the Dockerfile
, the problem is that after deployment the image seems to contain the first/old commit of my repo and an old .jar
file that runs when the deployment is done. To be fair when I firstly created my app on fly.io
I used this jar file but it had incorrect data paths as it was reading data from the root directory of the cloned repo and any data stored always got wiped, hence I tried to use a volume to store the data. My first volume attached correctly and was able to view the directory and noticed that it contains a file called lost+found
by default but when I redeployed a new version everything fell apart. How can I fix this? I have deleted and re-created the app more than 5 times now but the problem is still happening. I suspect that when docker builds, it caches images and re-uses them for the next build. If this is the case how do I remove all my images from the fly.io registry and start afresh?