04/19/2023, 3:22 AM
Hi, I'm trying to get production setup working for self hosted growthbook instance. I have Kong as gateway in front of growthbook app and api instances.
Copy code
docker-compose.yml config
      - MONGODB_URI=<mongodb://root:xxx@mongo:27017/>
      - APP_ORIGIN=<>
      - API_HOST=<>
      - NODE_ENV=production
      - JWT_SECRET=qwertyuiopasdfghjklzxcvbnmertyui
      - ENCRYPTION_KEY=qwertyuiosdfghnjmxcvbnmdfghj

GET <>
{"name":"GrowthBook API","production":true,"api_host":"<>","app_origin":"<>","config_source":"db","email_enabled":false,"build":{"sha":"2dca1f35ceb8ff9748f380cfb6aa481a45109b2b","date":"2023-03-17T18:06:14Z"}}

GET <>
{"status":401,"message":"No authorization token was found"}
[1] Why is api_host in response shown as "", config has this set as "" [2] How do I resolve missing token issue, will appreciate any pointers. Thank you 🙏


04/19/2023, 9:06 AM
It should be showing you the values of APP_ORIGIN and API_HOST. If you want to run on a custom port (like 443) you must adjust the ports in the environment variables. If you need to change the ports on your local dev environment (e.g. if
is already being used), you need to update the above variables AND change the port mapping in `docker-compose.yml`: growthbook: ports: - “4000:3000” # example: use 4000 instead of 3000 for the app - “4100:3100" # example: use 4100 instead of 3100 for the api ... environment: - APP_ORIGIN=http://<my ip or url>:4000 - API_HOST=http://<my ip or url>:4100


04/19/2023, 9:23 AM
I have updated the config as per these instructions only. GB app and api are running on default ports, https is handled by the gateway layer and it forwards requests to ports 3000 and 3100 on the GB instance. I'm now able to create login and access GB interface, however my previous features and experiment config are not available. I'm recreating them from scratch.