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

thousands-doctor-54767

10/06/2022, 6:37 PM
hey all, I'm testing out growthbook locally and had it working a bit, but now I keep hitting this error. Says it can't reach
<http://localhost:3100>
. Verified I can hit that url via curl
Copy code
curl <http://localhost:3100>
{
  "name": "GrowthBook API",
  "production": false,
  "api_host": "<http://localhost:3100>",
  "app_origin": "<http://localhost:3000>",
  "config_source": "db",
  "email_enabled": false,
  "build": {
    "sha": "af7445a60d38c531c2364ff151d4010360ce1032",
    "date": "2022-10-05T14:17:00Z"
  }
}
f

fresh-football-47124

10/06/2022, 6:49 PM
hi Alex, can you share what the docker compose file is set to? Particularly, the environment variables
APP_ORIGIN
and
API_HOST
?
Looks like you’re running the app on port 4100, but have the app_origin set to localhost:3000 - you can change the APP_ORIGIN to match, so set it to http://localhost:4100
t

thousands-doctor-54767

10/06/2022, 7:24 PM
ah, ok I'll try that!
for reference, my docker compose was:
Copy code
% cat docker-compose.yml
# docker-compose.yml
version: "3"
services:
  mongo:
    image: "mongo:latest"
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=password
  growthbook:
    image: "growthbook/growthbook:latest"
    ports:
      - "4100:3000"
      - "3100:3100"
    depends_on:
      - mongo
    environment:
      - MONGODB_URI=<mongodb://root:password@mongo:27017/>
    volumes:
      - uploads:/usr/local/src/app/packages/back-end/uploads
volumes:
  uploads:
f

fresh-football-47124

10/06/2022, 7:27 PM
you can add to the environment line the APP_ORIGIN and API_HOST
t

thousands-doctor-54767

10/07/2022, 2:30 PM
that worked! thanks Graham
365 Views