https://www.growthbook.io/ logo
#ask-questions
Title
# ask-questions
s

stocky-river-58964

01/30/2023, 9:48 AM
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

fresh-football-47124

01/30/2023, 2:46 PM
sorry about that
👍 1
s

stocky-river-58964

01/31/2023, 4:33 AM
Thanks, could you also take a look at my previous question? I updated it. Thanks again.
f

fresh-football-47124

01/31/2023, 5:08 AM
if you want to make sure - you can either use a named mongo volume, or an entirely separate mongo server
s

stocky-river-58964

01/31/2023, 5:10 AM
thanks, will do.
w

wonderful-branch-2202

01/31/2023, 9:29 AM
Hello, I am also facing the same issue even though the volumes is added. How did you solve this Amir?
s

stocky-river-58964

01/31/2023, 9:33 AM
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
17 Views