Comments (7)
Hey @jtyr
I'm implementing it slightly different, by merging directive objects instead of manipulating strings.
I'm creating a PR.
from caddy-docker-proxy.
Additional question... Works the plugin with multi node / host swarm setups or just single / locale host?
from caddy-docker-proxy.
Hi @lucaslorentz,
any plans to implement load balancing by container ip addresses?
from caddy-docker-proxy.
Hi!
I am also quite interested in having this. Since it would make it possible to scale up the backend containers and adding it to load balancing in caddy on the fly.
from caddy-docker-proxy.
Hey @jcmeier
We already supports multiple backend containers with scale up and down. You just need to add labels to a swarm service.
Caddy will then proxy to swarm service VIP, and swarm service will load balance to all containers.
This issue is to add the same capabilities without swarm services.
from caddy-docker-proxy.
Thanks for clearing this up @lucaslorentz!
from caddy-docker-proxy.
I have put together a hacky solution for loadbalancing containers in a service. It only works if the labels are defined on the service level:
version: "3"
services:
frontend:
image: mycaddy
ports:
- 443:443
backend:
image: mycaddy
labels:
caddy.address: https://example.com
caddy.targetport: 80
caddy.proxy.keepalive: 0
deploy:
replicas: 2
It would be more difficult to make it working if labels are defined under the deploy
section. It would require to search for nodes where service tasks are running and then search for containers on those nodes which have swarm label with the service name (am I right @lucaslorentz?). Please test it and let me know whether it works for you and if yes, I will create a PR for this feature.
from caddy-docker-proxy.
Related Issues (20)
- Multiple of the same directive HOT 2
- caddy overloaded as a random container keeps restarting HOT 11
- admin config ignored HOT 3
- caddy in docker reverse proxy to a tunnel to local machine not working
- Vaultwarden HOT 4
- HTTP/2 Rapid Reset : CVE-2023-44487 HOT 3
- Q: How to define global snippets? HOT 3
- How to make requests to reverse proxy inside docker network? HOT 7
- Service is not in same network as caddy in docker swarm
- Error using php_fastcgi directive: two Caddy blocks are created HOT 10
- sticky sessions HOT 3
- Caddy is not reading my labels HOT 4
- Latest version not available trough xcaddy build HOT 2
- Featurerequest in Readme: How to use basic auth? HOT 5
- Is it possible to automate reverse proxy entries? HOT 6
- Enable gzip globaly HOT 2
- How to enable brotli module HOT 1
- Issue redirecting from non-www to www or vice versa HOT 5
- crashed/stopped container results in a 308 loop (bug?) HOT 5
- does caddy-docker-proxy support 443/udp? 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.