This message was deleted.
# ask-questions
w
This message was deleted.
f
You want to mount a persistent volume for the MongoDB container. Or, switch to using a hosted service like MongoDB Atlas instead.
s
got it. can i use s3 as a persistent volume? will this work?
Copy code
depends_on:
      - mongo
    environment:
      - MONGODB_URI=<mongodb://root:password@mongo:27017/>
      - APP_ORIGIN=${APP_ORIGIN}
      - API_HOST=${API_HOST}
    volumes:
      # - uploads:/usr/local/src/app/packages/back-end/uploads
      - uploads:
          S3_BUCKET:${S3_BUCKET}
          S3_REGION:${S3_REGION}
volumes:
  uploads:
f
You can use that for file uploads, but not for MongoDB.
s
Okay. Thanks.
Followed your suggestion: a. Now mounted a EBS block to an EC2 instance (/data), b . Changed the docker yaml to
Copy code
volumes:
      - uploads:/data/growthbook/uploads # ebs volume that is mounted for persistent storage
However, when I restart it is not storing user/role information
We are asked to sign up again
f
There are 2 directories to persist. uploads is only for file uploads (e.g. adding screenshots of experiments). The other directory you need is on the
mongo
container and not the growthbook one. In the mongo container, data is stored at
/data/db
so that needs to be persisted
s
Thanks for your help.
242 Views