diff --git a/Dockerfile b/Dockerfile index 5af729792..b119c472e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,10 +10,6 @@ RUN git config --global --add safe.directory /app ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2 # Install js packages and gems -# Put node_modules outside the app volume. Having node_modules be a named volume -# means that on subsequent package changes the named volume will overlay the newly -# installed packages. Not needed for gems since they already install somewhere else. -ENV NODE_PATH=/node_modules COPY package.json yarn.lock ./ RUN yarn install diff --git a/docker-compose.yml b/docker-compose.yml index bf0e8e7be..382c416ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,6 +30,7 @@ services: image: e621 volumes: - .:/app + - node_modules:/app/node_modules - public_packs:/app/public/packs - post_data:/app/public/data environment: @@ -117,6 +118,7 @@ services: VIPS_WARNING: "0" volumes: - .:/app + - node_modules:/app/node_modules depends_on: <<: *common-depends-on entrypoint: bundle exec rails test @@ -148,4 +150,6 @@ volumes: elastic_data: db_data: redis_data: + node_modules: public_packs: + public_packs_test: