Move the docker-compose.yml file to another directory

Hello,
I have created two Nginx and PHP containers using the docker-compose.yml file. Now I want to create another container, but I want to transfer the files related to the previous containers in a directory called Nginx-PHP. Is this possible?

Cheers.

Yes, it is possible to create another container and transfer files related to the precious Nginx and PHP container.

1 Like

Hello,
Thank you for your reply.
I mean to sort the directory. For example, you had created a docker-compose.yml file in a directory, now you decided to create some more containers. Can you move the YAML file you created earlier to a directory?

You can put your yaml files anywhere.

Take a look to the COMPOSE_FILE variable to set just before calling docker compose.

I use this everyday because I 've many yaml files so I get the list of files, initialize the variable and call docker compose.

Really handy.

1 Like