https://www.growthbook.io/ logo
s

sparse-thailand-8230

10/18/2021, 6:37 AM
<!channel> I am configuring GrowthBook in my VM ( I use vpn). But, there is this errors. Can anyone help me resolve it?
f

fresh-football-47124

10/18/2021, 6:41 AM
hi Abinash
when you visit that link, localhost:3100 does it return anything?
s

sparse-thailand-8230

10/18/2021, 6:42 AM
No, it is not returning anything.
f

fresh-football-47124

10/18/2021, 6:43 AM
are you using the docker contianers?
s

sparse-thailand-8230

10/18/2021, 6:44 AM
Yes, I am using docker containers
on my ip:3100
it is saying that app origin is on localhost:3000 while api_host: myip:3100
f

fresh-football-47124

10/18/2021, 6:51 AM
ah, did you edit that? typically they're on the same IP
s

sparse-thailand-8230

10/18/2021, 6:52 AM
No, I didnt edit that.
f

fresh-football-47124

10/18/2021, 6:55 AM
try editing the APP_ORIGIN in your .env.local
if you look at the front end again, are you getting an error in the dev console? perhaps a CORS error?
you should also check and change the API_HOST in /packages/front-end/.env.local
s

sparse-thailand-8230

10/18/2021, 7:03 AM
Okay.. let me try
f

fresh-football-47124

10/18/2021, 7:04 AM
I think you can set those environment variables
s

sparse-thailand-8230

10/18/2021, 7:04 AM
can you please tell me that in which file ,the configuration is ?? so that i can change the api origin there
f

fresh-football-47124

10/18/2021, 7:05 AM
ya, one sec - since its docker... APP_ORIGIN and API_HOST should be changable in the environment
s

sparse-thailand-8230

10/18/2021, 7:06 AM
Can you please provide proper steps to follow, As I am completely new to both docker and this.
f

fresh-football-47124

10/18/2021, 7:06 AM
okay, sure
s

sparse-thailand-8230

10/18/2021, 7:06 AM
Thank you
f

fresh-football-47124

10/18/2021, 7:09 AM
1. edit the file docker-compose.yml 2. find the line under 'growthbook:' where it says 'environment:' - MONGODB_URL and add below it the two lines:
- APP_ORIGIN=http://<my ip>:3000
- API_HOST=http://<my ip>:3100
make sure the spacing matches
then restart the docker containers
(docker-compose.yml will be in the root of where you cloned your growthbook code)
s

sparse-thailand-8230

10/18/2021, 7:26 AM
Yeah. The problem got resolved. Thank you !!!
f

fresh-football-47124

10/18/2021, 7:26 AM
great!
2 Views