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

many-manchester-64444

10/06/2021, 2:13 PM
Hi Team, I'm trying to setup growthbook on my server. I changed API_HOST and API_ORIGIN with 0.0.0.0:8001 and 0.0.0.0:8000 respectively. I can access the API however the growthbook app could not. I found that it made request to wrong url like this image. Anyone knows how to fix this? anyway it worked on my local computer by using the same configuration but I am facing this error on my server.
f

future-teacher-7046

10/06/2021, 2:16 PM
APP_ORIGIN and API_HOST should include
http://
. Also, I'm not sure it will work to set it to 0.0.0.0 since that might break the CORS headers
Also, make sure for the origin, the environment variable name is
APP_ORIGIN
and not
API_ORIGIN
So to summarize, if you want to access the app and api at
localhost:8000
and
localhost:8001
respectively, you would set the following environment variables: • APP_ORIGIN=http://localhost:8000 • API_HOST=http://localhost:8001 And you'll also need to update the port mapping in docker-compose.yml to be:
Copy code
ports:
      - "8000:3000"
      - "8001:3100"
m

many-manchester-64444

10/06/2021, 2:37 PM
Ah thanks! It works now, I include http:// and make sure it connects to right address. anyway may i delete my post? I forgot to mask my url 😅.
f

fresh-football-47124

10/06/2021, 2:49 PM
(removed the files with the IP address)
18 Views