-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Update stack-proxy.yml #17
base: main
Are you sure you want to change the base?
Conversation
tmackness
commented
Jan 21, 2019
- use traefik for the dashboard, thus remove port binding 8080 and access via subdomain
- add a default network e.g. proxy (save adding "traefik.network=proxy" label to every service)
- set exposedByDefault to false, thus have to use "traefik.enable=true" label in each service for better security.
- use traefik for the dashboard - add a default network e.g. proxy (save adding "traefik.network=proxy" label to every service) - set exposedByDefault to false, thus have to use "traefik.enable=true" label in each service for better security.
@tmackness good work on this! I'll test it. The missing part (Consul on HA set up) of the puzzle is here: https://dockerswarm.rocks/traefik/ Still testing on my side. Cheers! |
Hey, thanks for the PR. Some feedback:
|
3 I’ll have a look and get back to you. |
FYI I'm testing with the stack-proxy-global.yml now, as stack-proxy.yml isn't redundant in any way. The "self proxy" of the dashboard doesn't work for me with consul backend and seeding it with a different traefik service. |
ah, ok got traefik working, not sure what I did different... :), I'm adding each of these as a commit for both stack files for traefik and giving you credit :). So 1 and 2 are implemented so far. |
Ah great. As for 3. here in the docs states:
|
I prefer to set a label on all the containers I wish to connect to Traefik in order to be more explicit. |
I'ved tested exposedByDefault and I'm confused by it's use. How can a service be exposed by default if traefik doesn't know what port it runs on or the dns name to route to it? I can confirm if I remove port/hostname labels that the frontend/backend disappear. So either exposedByDefault is false by default and docs are wrong, or there is something else I don't understand for how you "accidentally expose services on the proxy network". Thoughts? |
I see what your saying. I'm very new to Traefik TBH and didn't actually give it too much thought. Maybe setting defaults in the Traefik service could cause some to connect? Say you have multiple services that expose port 1000 and you have the Traefik defaults with:
Haven't tested this, but maybe it would automatically proxy to these services? |
This sheds a little light: Issue 663 |
I have working example on my repo: https://github.com/FinalDes/docker-swarm-defauts/blob/master/traefik/docker-compose.yml |