Hi team, One query regarding docker-compose.yml, W...
# ask-questions
m
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
You would need to set the right env vars for saving the files to s3.
m
Any example to refer to
w
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