<!channel> I am configuring GrowthBook in my VM ( ...
# ask-questions
s
<!channel> I am configuring GrowthBook in my VM ( I use vpn). But, there is this errors. Can anyone help me resolve it?
f
hi Abinash
when you visit that link, localhost:3100 does it return anything?
s
No, it is not returning anything.
f
are you using the docker contianers?
s
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
ah, did you edit that? typically they're on the same IP
s
No, I didnt edit that.
f
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
Okay.. let me try
f
I think you can set those environment variables
s
can you please tell me that in which file ,the configuration is ?? so that i can change the api origin there
f
ya, one sec - since its docker... APP_ORIGIN and API_HOST should be changable in the environment
s
Can you please provide proper steps to follow, As I am completely new to both docker and this.
f
okay, sure
s
Thank you
f
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
Yeah. The problem got resolved. Thank you !!!
f
great!