Skip to content

Recent change caused Environment variables to no longer work #683

Open
@xarinatan

Description

@xarinatan

Today when I updated my dockergen container (latest tag), it no longer worked, seemingly not finding the environment variables I have defined anymore.
When I reverted to 0.14 everything worked fine again, so it seems like in image 9209330fbea3 there's a bug that it doesn't read from environment anymore.

I saw these errors that seem to indicate that it's reading the wrong maps for the wrong variables perhaps, but perhaps I'm wrong:

nginx-proxy-gen   | 2025/06/18 16:15:16 unable to find key from the path expression VIRTUAL_HOST in map map[PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin]
nginx-proxy-gen   | 2025/06/18 16:15:16 unable to find key from the path expression VIRTUAL_HOST in map map[ACMESH_VERSION:3.1.1 COMPANION_VERSION:v2.6.0-4-g1fd6385 DHPARAM_GENERATION:false DOCKER_HOST:unix:///var/run/docker.sock PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/app]
[...]
map[LETSENCRYPT_HOST:bashquotes.dragonhive.net NODE_VERSION:18.20.8 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin VIRTUAL_HOST:bashquotes.dragonhive.net VIRTUAL_PORT:3000 VIRTUAL_PROTO:http YARN_VERSION:1.22.22]
nginx-proxy-gen   | 2025/06/18 16:15:16 unable to find key from the path expression CERT_NAME in map map[LETSENCRYPT_HOST:bashquotes.dragonhive.net NODE_VERSION:18.20.8 PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin VIRTUAL_HOST:bashquotes.dragonhive.net VIRTUAL_PORT:3000 VIRTUAL_PROTO:http YARN_VERSION:1.22.22]

Note the VIRTUAL_HOST is present in the maps of the later errors when it's looking for different variables (like CERT_NAME), but not in the maps when it's looking for the VIRTUAL_HOST variable, so perhaps it's grabbing the wrong ones?

I know about the work to move to labels instead of environment variables but this seemed unrelated (and I also recall it being said they would still support the 'legacy' environment variables for the time being)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions