-
Notifications
You must be signed in to change notification settings - Fork 677
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
Connect mastercontainer to docker network specified by APACHE_ADDITIONAL_NETWORK #5539
base: main
Are you sure you want to change the base?
Conversation
…E_ADDITIONAL_NETWORK Signed-off-by: Apoorv Parle <[email protected]>
Signed-off-by: Apoorv Parle <[email protected]>
Signed-off-by: Apoorv Parle <[email protected]>
Signed-off-by: Apoorv Parle <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No, actually the container will always be connected to a nextcloud-aio network even if you don't specify it in the docker-compose file (as soon as you open the aio-interface). So this is a non-argument. And sorry for my late reply btw... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I still dislike this idea. I think it is better to simply add docs on the topic and add the external network via docker-compose if you really want to. The mastercontainer will only remove the default bridge
network and add itself to the nextcloud-aio
network (and will even create it if it does not exist) but will not modify the network config any further.
Maybe this was the case some time ago, because I remember this being stated in the default compose file itself. If this is no more a requirement then I agree that directly specifying the frontend network in compose file is better than an environment variable. Let me do some testing. |
This is an extension of #5484 to allow for
mastercontainer
's admin page to also be behind a reverse proxy (for security, authentication etc.) instead of just an unsecured localhost port. For example, I've my reverse proxy set up to pointhttps://aio-nextcloud.mydomain.com
tohttps://nextcloud-aio-mastercontainer:8080
for the admin page.Since the user is specifying
APACHE_ADDITIONAL_NETWORK
as a means to connect the reverse proxy, it is natural to use the same information for mastercontainer's reverse proxy setup as well. Yes in theory, the user can create this connection by docker commands or docker compose file (I do this today), but then the user must specify not just the network for proxy but also createnextcloud-aio
doing something like below:This isn't easy or obvious for newcomer, and it'd be much more seamless if handled automatically. FWIW, there's some precedence for mastercontainer manipulating its own network -- the default compose.yml suggests
network_mode: bridge
, then mastercontainer connects itself tonextcloud-aio
and then later disconnects itself from the bridge through a cron job. Since we're manipulating the network, it's a relatively incremental extension to connect mastercontainer with reverse proxy with minimal downsides.And the
start.sh
change also has the nice side-benefit of doing an early error check with clear error message if the specified network has issues.After this change, I imagine the end-user flow to be:
https://aio-nextcloud.mydomain.com
) pointing tohttps://nextcloud-aio-mastercontainer:8080
for the admin page.https://nextcloud.mydomain.com
) pointing tohttp://nextcloud-aio-apache:11000
.APACHE_ADDITIONAL_NETWORK=<the network name of reverse proxy>
.(FWIW, I do intend to post this as a guide somewhere after this pull request goes through.)