Host addr in between backend services

How do you I get the addr of host of one of my service from another service?

I have read the documentation about the BUILTIN environment variables and also the microservices but I still dont understand.

I have two services named service1 and service2, and service1 just do a basic http request to service2.
I have managed to set up internal ports correctly, I guess I then need to add environment variables myself.

But for the host when I go to one of the service environment variables I see this:
Screen Shot 2021-09-12 at 6.11.03 PM

But I cant map the name service1 or service2, it seems like a generated id.

Thank you

Hello Cecile,

Great catch. You are right - the application ‘HOST’ environment variables use IDs instead of something more predictable, like application names.

At the moment we are discussing about making it more ‘developer friendly’. We may change the env vars to be built using application names instead of IDs.

For now, what you can do is to make aliases to the builtin variables. E.g, create a “MY_APP_A_HOST” environment variable that is an alias to the built-in variable. This way, your app can use a more predictable env variable name “MY_APP_A_HOST” instead.

Let me know if you need any help to create an env variable alias (or with any other issue).

Kind regards,
Patryk Jeziorowski

Software Engineer | Qovery

Backed by top-notch investors
Demo Day - Techcrunch

BF10CE3397BD457AB5057595B6CB5E13.png