hi, getting issue to make it work using nginx as r...
# ask-questions
m
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
Hi Nikhil - are you able to access the API directly? it should show you a json object
m
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
okay, that’s working - but that api_host and app_origin don’t look right
m
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
did you run
docker-compose up
to refresh the settings?
m
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
how are you running the docker containers?
just from command line and docker-compose?
m
on ubuntu box running docker-compose up -d on cli
f
Are you using a virtual machine?
m
ya aws EC2
f
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
i am good for now, will try it latter. thanks
f
okay, let me know
m
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
great