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

most-doctor-7974

11/12/2022, 2:45 AM
hi, getting issue to make it work using nginx as reverse proxy, i had created subdomains (like gbapp.mydomain.com and gbapp-api.mydomain.com) and added ssl certs and in docker compose i added envs. in docker compose as : environment: - APP_ORIGIN=https://gbapp.mydomain.com - API_HOST=https://gbapp-api.mydomain.com But getting on login to https://gbapp.mydomain.com getting this error
Copy code
Failed to fetch.
It looks like you are using a custom domain. Make sure to set the environment variables APP_ORIGIN and API_HOST. View docs
am i missing something, as i believe on setting API_HOST ui should use that but it still refer to local host
f

fresh-football-47124

11/12/2022, 2:46 AM
Hi Nikhil - are you able to access the API directly? it should show you a json object
m

most-doctor-7974

11/12/2022, 2:48 AM
Hi Graham, if i navigate to https://gbapp-api.mydomain.com i get this json
Copy code
{
  "name": "GrowthBook API",
  "production": false,
  "api_host": "<http://10.1.22.106:3100>",
  "app_origin": "<http://localhost:3000>",
  "config_source": "db",
  "email_enabled": false,
  "build": {
    "sha": 
    "date": "2022-11-11T20:00:45Z"
  }
}
f

fresh-football-47124

11/12/2022, 2:49 AM
okay, that’s working - but that api_host and app_origin don’t look right
m

most-doctor-7974

11/12/2022, 2:50 AM
ya but i am setting these envs in compose it is not getting applied - APP_ORIGIN=https://gbapp.mydomain.com - API_HOST=https://gbapp-api.mydomain.com
f

fresh-football-47124

11/12/2022, 2:55 AM
did you run
docker-compose up
to refresh the settings?
m

most-doctor-7974

11/12/2022, 2:57 AM
i had use this in compose-file while pulling the container so i believe it should have already taken, let me try refresh anyway
tried couple of times it still not picking up
any idea what might be not working, anything in log is should be looking for ?
f

fresh-football-47124

11/12/2022, 3:19 AM
how are you running the docker containers?
just from command line and docker-compose?
m

most-doctor-7974

11/12/2022, 3:21 AM
on ubuntu box running docker-compose up -d on cli
f

fresh-football-47124

11/12/2022, 3:24 AM
Are you using a virtual machine?
m

most-doctor-7974

11/12/2022, 3:24 AM
ya aws EC2
f

fresh-football-47124

11/12/2022, 3:24 AM
we just need to make sure your editing the right docker-compose.yml
or one that the docker images are using
need more help?
m

most-doctor-7974

11/12/2022, 3:53 AM
i am good for now, will try it latter. thanks
f

fresh-football-47124

11/12/2022, 5:07 AM
okay, let me know
m

most-doctor-7974

11/12/2022, 4:53 PM
Hi, Things got resolved, there was a issue in my docker-compose , i had created two environment blocks. And latter it failed as JWT was not set. I done that now it working.
f

fresh-football-47124

11/12/2022, 4:53 PM
great
7 Views