I have a docker container that holds a django app. The static files are produced and copied to a static folder.
container folder hierarchy:
- var
- django
- app
- static
before i build the docker image, i run ./manage.py collectstatic
so the static files are in the /var/django/static
folder. To expose the app and serve the static files, i have on the host an nginx. The problem is that if i do a volume between the static folder and a designated folder on the host, when i run the docker container, the /var/django/static
folder in the container gets deleted (well, not deleted but mounted). Is there any way to overcome this? as in set the volume but tell docker to take the current files as well?