This message was deleted.
# ask-questions
w
This message was deleted.
s
put a volume on the mongo instance and it didn't happen again. I was using the docker-compose.yml file in the website, so if you could add an explanation or something about it in the docs, it might prevent the lazy ones like me from making these kinds of mistakes. 🤦 Although I doubt that
f
sorry about that
👍 1
s
Thanks, could you also take a look at my previous question? I updated it. Thanks again.
f
if you want to make sure - you can either use a named mongo volume, or an entirely separate mongo server
s
thanks, will do.
w
Hello, I am also facing the same issue even though the volumes is added. How did you solve this Amir?
s
hi, i changed the docker-compose to look like this: # docker-compose.yml version: "3" services: mongo: image: "mongo:latest" environment: - MONGO_INITDB_ROOT_USERNAME= - MONGO_INITDB_ROOT_PASSWORD= restart: always volumes: - ./mongo_vol/db:/data/db growthbook: image: "growthbook/growthbook:latest" ports: - "3000:3000" - "3100:3100" depends_on: - mongo environment: - MONGODB_URI=mongodb://user:password@mongo:27017/ - APP_ORIGIN=http://192.168.216.41:3000 - API_HOST=https: - JWT_SECRET=********************** volumes: - uploads:/usr/local/src/app/packages/back-end/uploads restart: always volumes: uploads:
hope this helps. although i'm sure the link Graham sent will help as well. https://forums.docker.com/t/why-docker-compose-down-deletes-my-volume-how-to-define-volume-as-external/67433
148 Views