Answer the question
In order to leave comments, you need to log in
What is volumes: nginx_data and nginx_data:/etc/nginx/templates for in Docker? What does it give?
What is the point of writing nginx_data:/etc/nginx/templates?
I read the documentation, but did not find a justification. At the university, the teacher wrote so simply (I didn’t think to clarify something then).
And now in the work task I don’t understand whether it is necessary or not ...
{"version": "3.1",
"volumes": {
"postgres_data": { },
"rabbitmq_data": { },
"nginx_data": { }
},
...,
"nginx": {
"build": {
"context": "./",
"dockerfile": "Dockerfile-nginx"
},
"env_file": ".env",
"ports": [
"${NGINX_PORT_EXT}:${NGINX_PORT_INT}"
],
"volumes": [
"nginx_data:/etc/nginx/templates"
],
"links": [
"server",
]
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question