-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I'm new to mutagen and mutagen compose but have been able to get things up and running (what an improvement to our hot module reloading times as compared to bind mounts!). I am running into one issue though (with mutagen-compose I think). I bring the orchestration up with mutagen-compose --project-name vue up and everything works as expected, however when I run mutagen-compose --project-name vue down the vue container comes down but the mutagen sidecar and sync session just keep running:
- Container vue-mutagen-1 Stopping 336.0s
- Container vue-vue-1 Removed 11.6s
- Mutagen Pausing session sync_afv4HMEvIQedDHD9zYR5nCQm7gokr7gazBO0BU8xtz6... 336.0s
So far as I can tell the SIGTERM is not making it to the container from the mutagen-compose down command. When I issue a docker container stop vue-mutagen-1 the rest of the orchestration comes down (network, etc...) and the sync is stopped and removed.
I am running:
- Windows 11 Enterprise 21H2 (OS build 22000.434)
- Mutagen version 0.13.0
- Compose version v2.2.3
- Docker version v20.10.7 (back by wsl2)
And for reference here is the mutagen compose file:
# This compose file must be run using mutagen-compose - please be sure you have
# it installed (see: https://mutagen.io/documentation/orchestration/compose)
version: '3.4'
services:
vue:
image: "node:14-alpine"
volumes:
# use a mutagen sync to address performance issues of bind mounts
- "vuesrc:/web"
# write node_modules to a named volume to reduce sync io
- "node_modules:/web/node_modules"
working_dir: /web
# We use the existance of the /web/node_modules/.bin directory as a proxy
# for whether or not node modules are already installed. This command will
# test to see if it exists and if not will run npm install (which takes a
# while), otherwise we skip it and in either case run the serve command
command:
- /bin/sh
- -c
- |
test -d /web/node_modules/.bin || npm install
npm run serve
ports:
- "8080:8080"
environment:
# Required to support hot module reloading
- CHOKIDAR_USEPOLLING=true
x-mutagen:
sync:
defaults:
ignore:
vcs: true
paths:
- "/node_modules"
vuesrc:
alpha: "."
beta: "volume://vuesrc"
volumes:
vuesrc:
node_modules:
Happy to provide any other details, logs, etc...