Hi, I’m trying to understand the recommended setup for production. In your docker-compose.yml, the web service uses both:
build: .
volumes:
- .:/code
Since build: creates an image with the project files copied, and volumes: mounts the local directory over the container, doesn’t this override the image content?
Is this intended for development only, or should this be used in production as well? Could you clarify the reasoning behind using both at the same time?
Thanks!
Hi, I’m trying to understand the recommended setup for production. In your
docker-compose.yml, thewebservice uses both:Since
build:creates an image with the project files copied, andvolumes:mounts the local directory over the container, doesn’t this override the image content?Is this intended for development only, or should this be used in production as well? Could you clarify the reasoning behind using both at the same time?
Thanks!