wodby / docker4php

Docker-based PHP stack
https://wodby.com/docker4php
MIT License
277 stars 44 forks source link

Docker compose improvment #16

Closed midlan closed 2 years ago

midlan commented 3 years ago
  1. I added traefik.enable=true to all traefik services. In my case, I don't have enabled autodiscovery on my traefik.
  2. I added www. prefix to nginx service. This may be potentional BC break. Maybe we should keep it commented?
csandanov commented 3 years ago

In my case, I don't have enabled autodiscovery on my traefik

what'a your traefik version? we're using v2.0. It should work by default: https://doc.traefik.io/traefik/providers/docker/#exposedbydefault

midlan commented 3 years ago

@csandanov I know it is enabled by default. But I don't like that feature so I disabled it. People like me, must add the traefik.enable=true.

midlan commented 3 years ago

@csandanov any request changes?

csandanov commented 3 years ago

@midlan sounds like you've configured traefik to your preferences and that in turn required some extra configuration on individual services. Not sure why we should add it to the default setup which we try to keep as simple as possible. We do not strive to cover every possible case, we assume people will customize everything to their needs and preferences.

midlan commented 3 years ago

@csandanov Ok I respect your view. People that disabled autodiscovery would probably know they need to add traefik.enable=true.

What do you think about the redirect with www. prefix? It can save a lot of time to people that needs to configure it. I would like to keep it there, just commented (the same way as xdebug configuration for php is).

csandanov commented 3 years ago

I think redirects requirements are unique per project, someone redirects to www, someone from, that's out of the scope of this project, we just offer a simple working setup that people can adjust to their needs, we use traefik and are open about it – if you need to change something in routing go to traefik docs website and learn how

midlan commented 2 years ago

This project saved me a lot of time. With templates solving www redirects it would be even better :) But you are maintainer, your project, your rules :) closing