Skip to content

add additional docker configuration environment variables - #4

Open
sseide wants to merge 1 commit into
jchonig:masterfrom
sseide:new_env_vars
Open

add additional docker configuration environment variables#4
sseide wants to merge 1 commit into
jchonig:masterfrom
sseide:new_env_vars

Conversation

@sseide

@sseide sseide commented Mar 12, 2022

Copy link
Copy Markdown
Contributor

this new PR replaces #2 and #3.

@sseide

sseide commented Mar 12, 2022

Copy link
Copy Markdown
Contributor Author

btw - should not squashing commits on merge do the same? One final consolidated commit in master on your repo?

@jchonig

jchonig commented Mar 13, 2022

Copy link
Copy Markdown
Owner

I haven't tried that with Github, but we were mixing a couple different things and I'd rather keep commits to a single purpose.

I added this in the review of your comments in the README, but let's discuss it here:

I run this behind an nginx proxy as a subfolder using linuxserver.io's swag container in the same docker-compose w/o having to do any of this.

In your example, if you specify the port as 8080 then it will be available to whatever servers can reach your docker host. Are you running this on a private network with proxy between that and the Internet?

Please provide more detail on where this configuration would be needed because as worded it seems wrong to me.

@sseide

sseide commented Mar 13, 2022

Copy link
Copy Markdown
Contributor Author

Sorry, but i had not seen any comments in the changed files itself, only the conversation comment.

Regarding the

ports:
 - 8080:8080

you are right - it is available than on all ip addresses and might not be the best example for a quick-start HowTo. It was a copy-paste error as i have to expose it on a different port than 8080 (8080 already used) and removed my local address there.

And for all the MMONIT_PROXY_* env vars - as the documentation states they are not needed when using your example - MMonit on a subfolder behind a reverse proxy. (e.g. internet -> https://my.proxy/mmonit/ -> docker-image)
Remark - in this configuration MMonit uses "set-cookie" directive for the session cookie without "Secure" flag. Here your proxy must add this, otherwise it might get stolen or send unencrypted over the network.

The MMONIT_PROXY_SCHEME settting configures MMonit to add the "Secure" flag to all set_cookie directives itself. But this only works not running on a subfolder like /mmonit/.
The other MMONIT_PROXY_* env vars are only needed when your HTTPS reverse proxy and the docker host running the HTTP based MMonit container are different systems. With additional security checks enabled (either mmonit running with https or "https" Scheme is configured via this env var) MMonit creates the redirect url after login based on the information it knowns by itself - therefor it redirects to the wrong url (its own server name/ip and port used inside docker image (=8080) as it does not know where clients can reach it. Therefore the other settings (.._NAME and .._PORT) must be set too in this scenario to get a working redirect after login.

Most people will not need these PROXY settings as they might use the reverse proxy with a sub-path like /mmonit/ as prefix.

@sseide

sseide commented Oct 1, 2022

Copy link
Copy Markdown
Contributor Author

@jchonig some progress here?

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

Successfully merging this pull request may close these issues.

2 participants