hey guys,
just want to ask where I can find the docker-compose.yml's if I deploy my stacks with the webGui?
I tryed saving the data volume of portainer and transfer it to a new host and then deploy the same portainer stack file and all my "old" stacks aren't there anymore.
Is there a possibility to extract them to github everytime I change them or maybe just extract them to the data volume?
Thank you all in advance.
Portainer 1.23.0 is used.
Are you managing the same endpoint with the new Portainer instance? If not, then your old stacks will not be listed inside of Portainer as you haven't migrated them also. If you can see your stacks, but they are showing as limited
this is because Portainer couldn't find the corresponding stack file and could possibly be due to how you have mounted your volume.
I can't give you instructions on how to migrate as we don't have any official instructions for this.
To answer your question: Inside the /data
directory there is a directory called compose
which is where the stack files are stored. Inside /compose, there will be directories labelled after the corresponding stackID in the Portainer database. You will have for example /data/compose/1/docker-compose.yml
, /data/compose/2/docker-compose.yml
...
Hope this helps
perfect! That was what I was looking for :)
As this is one of the first search results that comes up on google when looking for the location of stack compose files, here is the location for a "standard" install on linux:
/var/lib/docker/volumes/portainer_data/_data/compose/
Most helpful comment
As this is one of the first search results that comes up on google when looking for the location of stack compose files, here is the location for a "standard" install on linux:
/var/lib/docker/volumes/portainer_data/_data/compose/