Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help me understand how the nginx environment works #57

Open
michael-niemand opened this issue Mar 23, 2021 · 1 comment
Open

Help me understand how the nginx environment works #57

michael-niemand opened this issue Mar 23, 2021 · 1 comment

Comments

@michael-niemand
Copy link

michael-niemand commented Mar 23, 2021

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!!

@esolitos
Copy link

esolitos commented Jul 6, 2021

The configuration env variables are used when starting the container by gotpl to generate the nginx configuration, after that those are not used.
If you manually start nginx (bypassing the default docker-entrypoint.sh) you need to make sure that the nginx configuration is already present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants