shaharia-lab / smarty-pants

An open-source platform democratizing Generative AI Applications. Build and deploy AI-powered tools without extensive expertise. Features flexible data integration, semantic search, and LLM integration. Create sophisticated AI applications using your private knowledge bases.
https://smarty-pants.shaharialab.com
MIT License
2 stars 0 forks source link

Get Backend API base URL from environment variable - using runtime config for NextJS #60

Open shahariaazam opened 1 month ago

shahariaazam commented 1 month ago

When running in docker, we should be able to set the backend api endpoint (API_BASE_URL) as an environment variable. So the same docker image can be used for various deployment.

Currently the frontend will by default set the API base url to http://localhost:8080

Reference: https://github.com/vercel/next.js/discussions/44628

shahariaazam commented 1 month ago

I think there is no straight-forward way due to the nature and limitation by NextJS. We wanted to do some experiment here.