Hiya, thank you for letting me join the channel. I...
# ask-questions
b
Hiya, thank you for letting me join the channel. I have a total newb question as I’m trying to run GrowthBook locally on a different port from 3000. With the default port all is good but if I change port then I see a “failed to fetch” error. I have checked the docs and can’t see my mistake. Here’s my docker-compose.yml:
Copy code
version: "3"
services:
  mongo:
    image: "mongo:latest"
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=password
  growthbook:
    platform: linux/amd64
    image: "growthbook/growthbook:latest"
    ports:
      - "4000:3000"
      - "4100:3100"
    depends_on:
      - mongo
    environment:
      - MONGODB_URI=<mongodb://root:password@mongo:27017/>
      - APP_ORIGIN=localhost:4000
      - API_HOST=localhost:4100
    volumes:
      - uploads:/usr/local/src/app/packages/back-end/uploads
volumes:
  uploads:
Can anybody see where I’ve gone wrong? I’ve tried http://localhost:4000, http://127.0.0.1:400 for the environment variables but no luck. And I’ve searched the channel but not found this exact issue. Thank you!
f
did you add the http:// on the APP_ORIGIN and API_HOST?
b
Hiya! I just retried this (which I already tried, honest!) and this time it worked after a couple of hard refreshes:
Copy code
ports:
  - "4000:3000"
  - "4100:3100"
depends_on:
  - mongo
environment:
  - MONGODB_URI=<mongodb://root:password@mongo:27017/>
  - APP_ORIGIN=<http://localhost:4000>
  - API_HOST=<http://localhost:4100>
Thanks! When things are completely new, it’s hard to know where to look for the issue. Maybe it’d be worth adding the localhost example to the doc? I expect it’s a common scenario.
f