Revert "[Docker] Remove node_modules volume"

This reverts commit 12cf54a8f3.
This commit is contained in:
Earlopain 2022-12-06 23:13:51 +01:00
parent 8916eff2b6
commit 3294fabad5
No known key found for this signature in database
GPG Key ID: 6CFB948E15246897
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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: