diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 31b6212cb5..344edbd65d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,7 +10,7 @@ "ghcr.io/devcontainers-contrib/features/corepack:1": {} }, "forwardPorts": [3000], - "postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh", + "postCreateCommand": "/bin/bash .devcontainer/init.sh", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 2809cd2ca4..a52d086fb6 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -8,6 +8,7 @@ services: volumes: - ../:/workspace:cached + - node_modules:/workspace/node_modules command: sleep infinity @@ -46,6 +47,7 @@ services: volumes: postgres-data: redis-data: + node_modules: networks: internal_network: diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh index 729e1a9d2d..55fb1e6fa6 100755 --- a/.devcontainer/init.sh +++ b/.devcontainer/init.sh @@ -2,7 +2,8 @@ set -xe -sudo chown -R node /workspace +sudo chown node node_modules +git config --global --add safe.directory /workspace git submodule update --init corepack install corepack enable