I'm really newbie in Docker and Mutagen and it doesn't clear for me how to describe storages properly. So I ask you to give me some help with it. I'm trying to rewrite docker-compose.yml to work with mutagen-compose. This is original docker-compose file:
storefront:
build:
context: ./saleor-storefront
dockerfile: ./Dockerfile.dev
restart: unless-stopped
ports:
- 3000:3000
networks:
- saleor-backend-tier
depends_on:
- api
volumes:
- ./saleor-storefront/:/app:cached
- /app/node_modules/
# Nginx is used to proxy SSR requests thru docker networking
command: sh -c '(nginx &) && npm run start'
What I tried:
storefront:
build:
context: ./saleor-storefront
dockerfile: ./Dockerfile.dev
ports:
- 3000:3000
restart: unless-stopped
networks:
- saleor-backend-tier
depends_on:
- api
volumes:
- storefront:/app
- /app/node_modules/
# Nginx is used to proxy SSR requests thru docker networking
command: sh -c '(nginx &) && npm run start'
volumes:
saleor-db:
driver: local
saleor-redis:
driver: local
saleor-media:
storefront:
networks:
saleor-backend-tier:
driver: bridge
x-mutagen:
sync:
defaults:
ignore:
vcs: true
saleor-media:
alpha: "."
beta: "volume://saleor-media"
mode: "two-way-resolved"
saleor-storefront:
alpha: "./saleor-storefront"
beta: "volume://storefront/app"
mode: "two-way-resolved"
I get error for /app storage location from npm: saleor-platform-storefront-1 | npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
. File package.json exists in project's saleor-storefront directory itself and I decided it should be at mounted volume at /app directory. I think I made something basically wrong in the logic of map existing Docker's locations to mutagen-compose way. Thank you for any help.