version: "3"
services:
mongo:
image: mongo
working_dir: /c/data/
ports:
- 27017:27017
deploy:
replicas: 1
volumes:
- /c/data/:/data/db
I am tried that above stack file and I'm receiving exit code 14 error please give me the solution about the error,
working_dir
refers to a directory inside the container, not on the host. you need to make sure/c/data/
can be created on the node where the container runs (it is quite a weird path...). It is generally better to avoid using host volumes when working with stacks. – Stewart