I’m building a django app using docker. The issue I am having is that my local filesystem is not synced to the docker environment so making local changes have no effect until I rebuild.
I added a volume
which is syncing to my local filesystem but does my bundles that get built via webpack during the build don’t get inserted (because they aren’t in my filesystem)
My dockerfile has this
... setup stuff... ENV NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH ENV PATH=/node_modules/.bin:$PATH COPY package*.json / RUN (cd / && npm install && rm -rf /tmp/*) ...pip install stuff... COPY . /app WORKDIR /app RUN npm run build RUN DJANGO_MODE=build python manage.py collectstatic --noinput
So I want to sync to my local filesystem so I can make changes and have them show up immediately AND have my bundles and static assets present. The way I’ve been developing so far is to just comment out the app:rw line in my docker-compose.yml which allows all the assets and bundles to be present.