testdrivenio/django-on-docker

Static Files on Host Machine are deleted in development mode

jan-engelmann opened this issue · 1 comments

Hi Michael,
thank you for the great tutorial!
I only have one issue:
the command:
python manage.py collectstatic --no-input --clear in app/entrypoint.sh
deletes all static files on the host machine since the whole app folder is mounted inside the web container:
see
volumes: - ./app/:/usr/src/app/ in docker-compose.yml
So I'm trying to style my App with css files in the directory app/staticfiles and they get deleted everytime I build the image.
Thanks for your help!
Jan

Sorry. Figured it out. static files need to be placed in the app directory