Comments (4)
If you use labels at container level, it will use container ip address.
If you use labels at service level, it will use the service dns name and service VIP load balancer.
It is a very subtle difference on docker-compose file:
https://docs.docker.com/compose/compose-file/#labels-1
from caddy-docker-proxy.
@lucaslorentz
At the moment I have some problems with docker swarm dns resolution.
I don't know why, but after some time the swarm service container ip changes (restart, redeploy or what ever) and my service isn't reachable by swarm dns name anymore... I have to redeploy the service to get a new dns name and working container / service name resolution.
It looks like a bug for me...
So maybe it would be safer to use ip address(es) to proxy backends instead of swarm service / container dns names?
Did You noticed some swarm dns issues / bugs with caddy docker proxy?
from caddy-docker-proxy.
@pwFoo
I had the same issue.
It seems to be a swarm issue with VIP load balancing.
We can workaround it by using tasks.service
dns, instead of using service VIP.
I added some time ago this CLI option: proxy-service-tasks (Proxy to service tasks instead of VIP)
I've been using it for some time and it is much more stable.
Usage example:
command: -email [email protected] -agree=true -log stdout -proxy-service-tasks
from caddy-docker-proxy.
At the moment I work with container labels and all works fine with container ip addresses (until backend and proxy is in the same network!).
But I'll try the proxy-service-tasks
flag. Thanks!
For my custom service (docker-gen to get container hostname / dns) which have the above describled problems. Here I have to find my own solution to get working dns / ip with docker-gen.
from caddy-docker-proxy.
Related Issues (20)
- Run server NOT in docker? (but controller in docker) HOT 1
- Add --pidfile flag to docker-proxy
- wildcard not working HOT 2
- IPv6 Logging not working HOT 2
- Caddy 2.8 Final Release HOT 2
- Trouble with generic logging snippet import HOT 2
- Expose caddy admin 2019
- Custom images HOT 2
- How to local test caddy with whoami HOT 1
- Changing HTTP status code rewrite - is that possible using labels? HOT 1
- Simple redirect to custom 404.html (static site)
- Global options seems not working in caddy-docker-proxy itself HOT 1
- basic_auth label is still being written to caddyfile as basicauth which spams logs HOT 2
- Using the upstreams template in a snippet with arguments
- caddy-docker-proxy as file server ? HOT 1
- Is it possible to inject directives in an existing service? HOT 4
- Using CDP as a reverse proxy for non-docker services - is it possible? HOT 2
- How to enable caddy-docker-proxy in a new build? HOT 2
- Help to convert a snippet to labels HOT 10
- Searxng-docker Caddyfile Conversion Help HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy-docker-proxy.