didx-xyz / ssi-trust-registry

Trust Registry for Self-Sovereign Identity Ecosystems
Apache License 2.0
6 stars 2 forks source link

fix: set backend URL before the frontend build #187

Closed jakubkoci closed 9 months ago

jakubkoci commented 9 months ago

The NEXT_PUBLIC_BACKEND_URL env is actually build-time and must be set before the frontend build step inside the docker image.

@rblaine95 Could you please add it as a build argument to the CI pipeline build step? I'm not sure where exactly to set it.

rblaine95 commented 9 months ago

Is there any way to make it runtime?

The Local Dev URL is going to be different to the Dev URL is going to be different to the Prod URL and the whole purpose of Docker is "build once, run anywhere."

jakubkoci commented 9 months ago

@rblaine95 I’m afraid it’s not possible to make it runtime because it must be part of the JS bundle that’s sent to the browser.

Maybe we can do some pass-through calls via the frontend server, but that might require some work. Would it be difficult to make it custom per environment for now and we can look at how to solve it in Jan?

niall-shaw commented 9 months ago

No longer needed due to #190