G
G
great_772020-01-11 02:19:16
Docker
great_77, 2020-01-11 02:19:16

Where to place the folder with docker files(docker-compose, Dockerfiles, etc)?

- Outside the project or at the root of the project. Or in a separate thread. In general, what is the best way to organize everything.
- A separate repository is created for the directory or all in one. How better

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Dokin, 2020-01-11
@great_77

Inside the project, in the same repository. If this is the only Dockerfile, then it is possible in the root, but usually there are still all sorts of configs there, so a docker folder is created in the root of the project, in which everything you need is added.
Perhaps your doubts are related to the fact that someone from the outside will reach the assembly files and use them to your detriment. But the root of the project != the root of the site.
The project structure might look like this:

...
/docker (тут данные сборки)
/tests
/vendor 
/node_modules и т.п.
/web (это корень хоста для вебсервера)

As for a separate repository, you don't need it. The only exceptions are cases when it is required to share access rights to this directory among team members.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question