I have a stack deployed using a docker-compose file.Some of the containers will need to retrieve and host files located in a git repo (gitlab), what is the best way to retrieve / copy files from the repo to the container ?
E.g : containers "A" needs data from file "A" and file "B" which are hosted in a git repo (not the same repo where the code for container "A" is build from)
I did this before by using IaC (salt) but this is not good as this adds the needs to deploy from an image containing the salt client
I think this is also possible by integrating the file repo using submodules, but I always find git submodules not really user friendly.
What would you suggest for this use case (rather classical I guess)?
The question here being : What is the best practice to deploy files from a git repo into a container ? (given the container repo and the files to be deployed are in a different repo)