-
Notifications
You must be signed in to change notification settings - Fork 535
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
Change hardcoded traefik.backend setting to dynamic #343
Change hardcoded traefik.backend setting to dynamic #343
Conversation
it does not help, only one traefik (launched last) works. I don't think multiple traefiks may work with a single docker daemon. Have you seen https://wodby.com/docs/stacks/drupal/local/#running-multiple-projects? |
With this patch you can put multiple d4d docker-compose files wherever on your machine( I am running 3 of them as we speak). Don't need to have sites in the same parent folder with traefik.yml and all that extra config. I am not against documented suggestion, just this way you have more freedom and less configuration. Only way it didnt work was this hardcoded nginx value that would clash. Anyway that value shouldn't be hardcoded like that, its better to be dynamic per name of site project so think it should be commited, can't hurt, can help. |
I meant I run 2 docker-compose projects on different ports with different nginx labels and it did not work. Only works traefik that was started last, the first one gets "Gateway timeout". But maybe this is something specific to docker for mac or mounting docker socket. |
I was able to set up two traefik containers to run, as per @adriadrop. Prefixed "${PROJECT_NAME}_" |
I am running this on Mac. Also the very thing that happened to me is the gateway timeout, which would come from Nginx, because It was using the same backend in traefik. So basically all you have to do if using what I suggested is. Setup different project names |
Oh.. my bad, I did not update base urls 🤦♂️ |
Thank you! Now all services have the prefix, and this approach documented at https://wodby.com/docs/stacks/drupal/local/#running-multiple-projects |
I just wanted to say that this is needed on all services, but you beat me to it. Glad this is changed now :) |
I would just add that for the "different ports" docs you should state that basically they dont need to use traefik.yml file and compose up on it etc. All they need then is to have different ports and docker-compose up -d their folder. |
Per issue here, I provide a patch that solves this, so you can run multiple d4d projects even without using traefik.yml file on the same machine.
#342