How to access the hostname of mariadb in the nginx server
the mariadb and phpnginx are the service. I can see in the docs it is saying to use mariadb_password with prefix. But not working. It is in the same project, both service, how to connect/reference the hostname for now? I'm beginner, pardon for inconvenience
this is the config.php file ^ and I have this in the run

2 Replies
Hi, if you want to use env variable of a different service, it must be prefixed by a name of that service.
E.g. you have
phpnginx and mariadb services and want to use vairables from mariadb in phpnginx, this would be in your zerops.yaml
If you go to the mariadb service and scroll in the left menu to Environment variables, you will find all variables you can reference there.
And if you want to use env variable from the current service, e.g. from phpnginx inside of phpnginx, you can use it directly without a prefix, like so:
See: https://docs.zerops.io/features/env-variables#referencing-variables
thank you