Environment Variables

Is there a way to use shell expansion as environment variables in the Portainer UI when defining a service template? For example, I want to create an environment variable called HOSTNAME and then set the value to hostname so that it sets the variable to the worker’s hostname.

I opted to go a different route than using env vars. Instead, I’m binding a file with what I need and then reading that from within the container.