Y
Y
Yaroslav2019-01-09 17:11:30
Docker
Yaroslav, 2019-01-09 17:11:30

How to properly mount images folder using docker for development?

There is a web application, nginx + php + mysql, running on docker, there is a folder with all sorts of big statics like pictures, pdf, excel and so on. If in production I can connect it as a volume, then what about development? Especially if there are several developers?
There are 2 files for docker-compose, the first one is for deployment to production (deployed using GitLab, the tag is the last commit), the second one is for local development - just git clone and docker-compose up
How to pull image, pdf, excel files for development? After all, if they are not there, then it will not be possible to test many things like "download a document", pictures of articles, etc.
Is there a best practice for this? Something like rsync, NFS comes to mind...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2019-01-09
@chupasaurus

It is necessary to make a separate archiver with a minimum set of data for functional tests and keep it in an accessible place for developers (in principle, it is possible in the repo itself, but with the understanding that it is better not to keep gigabytes there) and a script with docker volume create some_name and deploying there archive, and then mount this volume in compose.yml for local development.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question