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

jolly-yacht-90975

02/03/2024, 6:15 PM
I created this using public repo but repeatedly am getting this error, Should I missed something.?
f

fresh-football-47124

02/03/2024, 6:15 PM
Can you visit the URL for the API endpoint direclty?
it should give you a json object if its working
the API_HOST needs to be a routable URL from the app
j

jolly-yacht-90975

02/03/2024, 6:17 PM
can you give the sample URL, coz I tried below URL - APP_ORIGIN=https://growthbook.domain.com/ #API_HOST=https://api.growthbook.domain.com/
f

fresh-football-47124

02/03/2024, 6:18 PM
it needs to be a url that works
so you should be able to open that api url in a browser
you can also check the container logs
sometimes the api will not run if you set the environment to production without changing the secrets
j

jolly-yacht-90975

02/03/2024, 6:25 PM
Okay,ok but I followed the public repo with steps and getting the API error after mentioned the routing URL as well
image.png
f

fresh-football-47124

02/03/2024, 6:26 PM
yes, probably because that API url isn't working
have you tried to visit that url directly?
j

jolly-yacht-90975

02/03/2024, 6:27 PM
Yes @fresh-football-47124
Can you give an example on this.? APP_ORIGIN=http://52.16.222.216:3000/ - API_HOST=http://52.16.222.216:3100/backend/
f

fresh-football-47124

02/03/2024, 6:29 PM
you want the API to run on a directory? its not set up for that, but it is possible with some kind of rewrite rules- though this is quite advanced
j

jolly-yacht-90975

02/03/2024, 6:37 PM
Yes, 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: - APP_ORIGIN=http://52.16.222.216:3000/ - API_HOST=http://52.16.222.216:3100/ - MONGODB_URI=mongodb://root:password@mongo:27017/growthbook?authSource=admin volumes: - uploads:/usr/local/src/app/packages/back-end/uploads volumes: uploads: mongodata: I just run the yaml file, should I need to update this.? or run in the directory
3 Views