-
Ask a Question!I updated portainer, and when I sign in, all the stacks are here and the containers are running with no issues, but the content of docker compose inside the editor disappeared from all stacks, whenever I click on the editor I am getting this message: "could not get the contents of the file 'docker-compose.yml'". Even if I manually add content to the editor in order to update the stack, the update button below is greyed and I can't complete this step. So how this happenned? In order to update Portainer, I deleted the old container and installed the new one (as I did many times before), but this time I installed the business version by mistake first, then when I figured out that I deleted it and reinstalled the community version. And now there is no docker-compose.yml or maybe portainer is unable to locte the data folder. However, when I redeployed the container I didn't change the settings of the portainer_data folder at all. This is really frustrating, because now I can't update any container with no docker-compose, I made only a back up back when the stacks were simple, but I was adding more and more settings and services to my existing stacks that took me a lot of research and time and I didn't back up these modifications. I would really really appreciate your help or if there is a workaround. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 14 replies
-
Can you explain how you deployed Portainer server, did you make a named volume before deploying Portainer or did you just deploy via the run command? You want to make sure that you manually created the volume first so each deployment will use that volume rather than making a new one on a new deployment, avoiding dataloss. |
Beta Was this translation helpful? Give feedback.
-
Hi Nick,
Only that this time I am having this problem where the docker-compsose files disappeared. I can't figure out what I did wrong this time! |
Beta Was this translation helpful? Give feedback.
-
Glad you got it sorted! |
Beta Was this translation helpful? Give feedback.
So, the portainer_data needed to be downgraded to be again compatible with the community edition, which turned out to be the underlying issue. I backed up the portainer_data volume and followed the downgrade steps outlined on the official website:
https://documentation.portainer.io/v2.0-be/downgrade/be-to-ce/
Now, everything appears to be working without any issues: Portainer has been updated to the latest -ce version, and I have full access to the Docker compose files.
Thanks a lot @Nick-Portainer for your patience and your help.