Hi, another question I'm running Growthbook with d...
# ask-questions
s
Hi, another question I'm running Growthbook with docker. I did a docker compose down instead of a stop, and all my features, endpoints, accounts went poof! what settings should I use for this to never repeat itself?
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