Multiple Servers, One Proxy #7052
XurxoMF
started this conversation in
Improvement Requests
Replies: 1 comment 11 replies
|
This is already possible, just add a dynamic file on main server pointing your subdomains to whichever lan ip will serve them http:
routers:
app1:
rule: "Host(`app1.example.com`)"
service: app1-service
tls: {}
app2:
rule: "Host(`app2.example.com`)"
service: app2-service
tls: {}
services:
app1-service:
loadBalancer:
servers:
- url: "http://192.168.1.101:80"
app2-service:
loadBalancer:
servers:
- url: "http://192.168.1.102:80"You can choose to run another proxy on your lan servers or not, if not you would need to port bind your apps to your lan interface and then change the above port, however if you are running replicas then you would run traefik and just leave it at port 80 to let traefik load balance on the lan server. |
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We need a way to add multiple servers to Coolify but let the traefik from thr Coolify server to proxy everything.
I know this will add more latency and so on but for some serups this is essential. For example:
I've a dedicated public IP with a domain pointing to it.
I've 3 servers inside my local network, one with Coolify and localhost server and then 2 other servers added to that Coolify.
On my router I'm resirecting 80 and 443 request to my Coolify server but, if I deploy a website on one of my secondary servers, I've no way to make requests reach that server as the 443 requests go to the main server...
With the one proxy option we could make the traefik installed on the Coolify server get all the requests and then proxy them to the server where the app is running.
The secondary servers will still have traefik running... the main server will only get request to the domains used on the secondary server and redirect them to the private IP of the server...
Then the secondary server will check the domain/subdomain... and rediect it to the container running thr app.
Another option is to remove the secondary proxy conpletely but I think this will be more complicated.
As I said, I know this will add latency and so on but it's the only way we have to allow setups like this one where multiple servers are under the same IP...
Map with the request route:
Client -> router -> coolify / main server -> main traefik -> secondary server -> secondary traefik (or not) -> app
Hope this get's added on Coolify v5 because I can only use the main server right now because of this 😭
All reactions