Browse Source

Isolate node_modules in Dev Container with a named volume

Bind-mounting the whole repo meant a host-installed node_modules
(e.g. from macOS/Windows) shadowed the container's own install,
causing native modules like Prisma's query engine to be built for
the wrong platform.
pull/7383/head
Lewis Nixon 4 weeks ago
parent
commit
a79be928b6
  1. 4
      .devcontainer/docker-compose.yml

4
.devcontainer/docker-compose.yml

@ -5,9 +5,13 @@ services:
dockerfile: .devcontainer/Dockerfile
volumes:
- ..:/workspaces/ghostfolio:cached
- node_modules:/workspaces/ghostfolio/node_modules
command: sleep infinity
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
node_modules:

Loading…
Cancel
Save