Provide full URL of deployed app in Environment

Hello
I have a NextJS app running as frontend (FE) with a Ruby on Rails app as backend (BE) API server.
The FE needs the URL of the BE.
Unfortunately, I can only alias an environment variable to the BE HOST. As I understand that env vars substitution is not yet available, I cannot create an URL from the BE HOST (such as https://${BE_HOST} for exemple.

So can you provide the full URL of the instance of a deployed app so we can create an alias on it ?

Cheers

Hi @emmanuelcohenlaroque ,

I am looking with the team since it’s a very common request (until we support environment variable substitution/interpolation).

In the meantime, I would highly suggest creating your expected environment variable in your Dockerfile. E.g. you can do this:

FROM ...

ARG BE_HOST
ENV HTTPS_BE_HOST "https://${BE_HOST}"

... your build commands

This way for your application it’s transparent.

Sorry for the late reply, this has been released! you can now use the vars substitution and concatenate multiple env vars to create a new one

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.