First image

Second image
What are you trying to achieve here exactly? In the first case, if you want to set HOSTNAME as an environment variable why not just set it as as a secret?
It’s also not a great idea to have a .env
file on your production server.