Skip to content

Commit

Permalink
Run docker compose with --renew-anon-modules (-V)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Rosén committed May 26, 2020
1 parent 58d4892 commit b7bd492
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@ FROM node:11
WORKDIR /frontend
COPY package.json yarn.lock ./
RUN yarn install
RUN mkdir -p /frontend/.cache /frontend/.parcel-cache
VOLUME /frontend/node_modules
VOLUME /frontend/.cache
VOLUME /frontend/.parcel-cache

# make sure that stale caches aren't used
RUN rm -rf /frontend/node_modules/*
RUN rm -rf /frontend/.cache/*
RUN rm -rf /frontend/.parcel-cache/*

RUN yarn run parcel --version
CMD yarn start
CMD sh -c 'if [ -z "$(ls -A /frontend/.parcel-cache)" ]; then yarn start; else echo "parcel cache not empty, run docker-compose with -V (--renew-anon-volumes)"; fi'

0 comments on commit b7bd492

Please sign in to comment.