Skip to content

Help me understand how the nginx environment works #57

@michael-niemand

Description

@michael-niemand

Hi there,

We got the requirement to start nginx using sudo -E nginx instead of just the default sudo nginx (= I dont provide a command at all).

I tried changing the docker command to sudo -E nginx , but it fails to come up entirely now. So I'm trying to understand how it all works.
The container runs as wodby user, where all the environment variables reside. Now the nginx is started with a regular sudo (without "-E") and it works. But how?
If all the env vars are registered in the shell the container runs as (=wodby), how does the nginx see all these env vars? Are they passed into the sudo environment somehow?
Or maybe the nginx doesnt even need the env vars since it's config is being generated out of these? But then why won't it work with sudo -E since there should be a proper config file either way. I really hope someone can help me understand, thank you!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions