Archived
fix(docker): synchronize dev dependency volume
This commit is contained in:
+2
-6
@@ -327,13 +327,9 @@ Use this shared directory to switch between runtime and dev mode, not to run bot
|
||||
|
||||
For sessions to appear under the same workspace in both modes, use the same project path in PI WEB. On Linux, prefer host-mounted paths such as `/home/core/<repo>`, `/srv/<project>`, or `/opt/<project>`. On Mac, prefer paths under `/Users/<you>/...`. The dev container also exposes this checkout as `/workspace` so the PI WEB dev server can run from it, but sessions started against `/workspace` are organized under that different working-directory path and will not line up with runtime sessions for the host-mounted path.
|
||||
|
||||
When `package-lock.json` changes, rebuild the dev image and recreate the `node_modules` volume so the bind-mounted checkout sees the new dependency tree:
|
||||
Development startup keeps the persistent `node_modules` volume synchronized with the dependency tree built into the dev image. When `package.json`, `package-lock.json`, the Node image, or another dependency-build input changes, `start` or `update` rebuilds the image and `data-init` refreshes the volume before `sessiond` starts. Manual volume removal is not required.
|
||||
|
||||
```bash
|
||||
./docker/pi-web-docker --dev stop
|
||||
docker volume rm pi-web-dev_node_modules
|
||||
./docker/pi-web-docker --dev start
|
||||
```
|
||||
If Compose is invoked directly without rebuilding after a manifest change, `data-init` stops with a mismatch message instead of starting against stale dependencies. Run `./docker/pi-web-docker --dev start` or `./docker/pi-web-docker --dev update` to rebuild and synchronize it.
|
||||
|
||||
## Local checkout validation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user