-
Notifications
You must be signed in to change notification settings - Fork 444
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
Allow caddy container to connect to multiple networks through patches #935
Comments
🤔 Tutor was really not designed to share services between different Compose projects. I'm not sure I want to open that can of worms by supporting this feature. Did you consider running another Caddy container outside of Tutor? That second Caddy container would act as a proxy for the other containers. There would be very little performance overhead, as far as I understand. |
Yes and acutally that was our first approach (to make tutor caddy run as a proxy only for tutro related services and to run it behind another main proxy that manges all the services). But we got a weird a bug that is only occurs in chrome evey now and then; The error in dev console was/is And we were able to resolve it, by reverting to default tutor proxy mode, that is we let tutor take over the proxy. |
I understand. Can we try to resolve this bug that you are facing instead of adding a complex feature to Tutor? |
Yes, If you generally don't consdir adding patch for caddy I would say if possible let's keep it open for now and I would post about it in discuss.openedx.org and see either if other folks have had encountred the same bug or they would find the flexbility of extra networks patches for any reason useful. |
An alternative solution which you can start using today is to add your changes to a docker-compose.override.yml file. Did you consider that option? |
I just looked into it and here is what I did in order for it to work,
And then inside the new ...
services:
caddy;
image: someething
netowrks:
- my_spesfic_services
networks:
default
my_services:
external: true And it worked as expected, let me know if you consdier the approch valid. Thank you! |
Yep, that's pretty much what I had in mind. The only downside that I can see is that the override file is going to cause |
@ghassanmas can we close this, or would you like to open a PR to create a new "docker-compose.prod.override.yml" file? |
Yes, I will open a PR for closing this. |
Is your feature request related to a problem? Please describe.
We have a tutor/Open edX installtion on a server which is also as well sharing (services/ docker compose project(s)), we would want the caddy container to be proxy server for all other projects, but however when creating extending the Caddyfile through
caddyfile
file patch as e.g.in order for the above to work something like the following needs to be run:
docker network connect myservice_network tutor_local-caddy-1
.And ecahtime the caddy container would be recreated the above command needs to run, unless we create a patch somwhere here:
tutor/tutor/templates/local/docker-compose.prod.yml
Lines 19 to 27 in 3b2373f
Probably it would like this: where we add extra patch, called
local-docker-compose-caddy-networks
Would such change be accepted, if yes; (I would open a PR accordingly), if not can you suggest an alternative if possible.
Thank you!.
The text was updated successfully, but these errors were encountered: