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

magnificent-nightfall-63762

08/28/2023, 9:29 AM
Hi team, One query regarding docker-compose.yml, What is the purpose of the following and is this really required for prod
volumes:
- uploads:/usr/local/src/app/packages/back-end/uploads
Can the uploads value be replaced with a S3 bucket
w

white-fireman-22476

08/28/2023, 9:58 AM
You would need to set the right env vars for saving the files to s3.
m

magnificent-nightfall-63762

08/28/2023, 10:00 AM
Any example to refer to
w

white-fireman-22476

08/28/2023, 10:04 AM
You would just need to add the vars to the environment like so:
Copy code
version: "3"
services:
  mongo:
    image: "mongo:latest"
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=password
    volumes:
      - mongodata:/data/db
  growthbook:
    image: "growthbook/growthbook:latest"
    ports:
      - "3000:3000"
      - "3100:3100"
    depends_on:
      - mongo
    environment:
      - MONGODB_URI=<mongodb://root:password@mongo:27017/growthbook?authSource=>
      - UPLOAD_METHOD=s3
      - S3_BUCKET=...
      - S3_REGION=... (defaults to us-east-1)
      - S3_DOMAIN=... (defaults to https://${S3_BUCKET}.<http://s3.amazonaws.com/)|s3.amazonaws.com/)>
      - AWS_ACCESS_KEY_ID=... (not required when deployed to AWS with an instance role)
      - AWS_SECRET_ACCESS_KEY=... (not required when deployed to AWS with an instance role)
volumes:
  mongodata:
Oh and you can get rid of the uploads bits
edited it to remove those. You would need to fill in the ... (or delete the line if not needed)
👍 1
16 Views