Repository navigation
Replies: 3 comments 3 replies
|
First: external lb (cf, aws elb, haproxy cluster, etc.) Second: traefik oss is not cluster aware, so each instance is independent. alternatively, you can avoid shared acme entirely by using dns challenge on one single traefik instance, which is cleaner and avoids race conditions. Third: Lastly: |
|
Also is it best to keep the swarm nodes in the private LAN and not expose it to the internet via a public IP? |
|
Did you end up getting this working how you wanted? Making a few servers feel like one simple platform is a big part of why I’ve been building with https://github.com/getployz/ployz. Curious what you settled on for keeping previews separate from production, and whether you’re happy with it now. |
Uh oh!
There was an error while loading. Please reload this page.
What is the preferred way of setting up dokploy on multiple nodes? From my understanding dokploy uses docker swarm which can have multiple worker nodes that run the actual image/deployment
flowchart TD U[Users / Internet] subgraph SWARM["Docker Swarm Cluster"] direction TB MGR["Manager Node Dokploy + Swarm Manager Reverse Proxy / Load Balancer"] subgraph NODE1["Worker Node 1"] APP1["Website A Docker Service"] end subgraph NODE2["Worker Node 2"] APP2["Website B Docker Service"] end end U -->|HTTP/HTTPS| MGR MGR -->|Route traffic for site-a.com| APP1 MGR -->|Route traffic for site-b.com| APP2 MGR -.->|Swarm Control Plane| NODE1 MGR -.->|Swarm Control Plane| NODE2 classDef manager fill:#f9d,stroke:#333,stroke-width:2px; classDef worker fill:#bbf,stroke:#333,stroke-width:1px; classDef app fill:#bfb,stroke:#333,stroke-width:1px; class MGR manager; class NODE1,NODE2 worker; class APP1,APP2 app;This setup works only with docker stack and not docker-compose and leaves the dokploy ui empty for running containers/logs on projects view. Also this has a single point of failure since if de dokploy/docker-swarm-manager goes down everything goes down.
Then there is a option for remotes servers which controls the server via ssh but requires each server to have a public ip which is added to your DNS.
flowchart TD U[Users / Internet] subgraph DOKPLOY["Dokploy Infrastructure"] direction LR D["Dokploy Server Control Panel / Deployment Manager IP: 10.0.0.10"] subgraph RS1["Remote Server 1"] A["Website A Public IP: 203.0.113.10 domain-a.com"] end subgraph RS2["Remote Server 2"] B["Website B Public IP: 203.0.113.20 domain-b.com"] end end %% User traffic goes directly to each remote server U -->|HTTPS domain-a.com| A U -->|HTTPS domain-b.com| B %% Dokploy manages deployments remotely D -.->|SSH Deployments / Docker Management| RS1 D -.->|SSH Deployments / Docker Management| RS2 classDef dokploy fill:#f9d,stroke:#333,stroke-width:2px; classDef remote fill:#bbf,stroke:#333,stroke-width:1px; classDef app fill:#bfb,stroke:#333,stroke-width:1px; class D dokploy; class RS1,RS2 remote; class A,B app;This approach is resolves the single point of failure if dokploy goes down the app/sites keep running since the are indepenent you just can release/deploy if 1 of the nodes goes down only the apps/site running there will go down.
The remote server als creates its own swarm which are separate from the dokploy instance but makes scaling harder since for you need to added the IP of each server to the DNS.
My solution would be setting it up in this way.
flowchart TD U[Users / Internet] LB["Load Balancer HAProxy / Nginx / Cloud LB"] U --> LB subgraph CLUSTER["Docker Swarm Infrastructure"] direction LR subgraph S1["Dokploy Server 1"] D1["Dokploy + Swarm Manager"] end subgraph S2["Dokploy Server 2"] D2["Dokploy + Swarm Manager"] end subgraph S3["Node Server 1"] subgraph W1["Worker Node 1 Runs Containers / Jobs"] A[Docker stack site-a.com] D[Docker stack site-a.com] end end subgraph S4["Node Server 2"] subgraph W2["Worker Node 2 Runs Containers / Jobs"] B[Docker stack site-a.com] E[Docker stack site-a.com] end end subgraph S4["Node Server 3"] subgraph W3["Worker Node 3 Runs Containers / Jobs"] C[Docker stack site-a.com] F[Docker stack site-a.com] end end end LB --> D1 LB --> D2 D1 -.->|Swarm Control Plane| W1 D1 -.->|Swarm Control Plane| W2 D1 -.->|Swarm Control Plane| W3 D2 -.->|Swarm Control Plane| W1 D2 -.->|Swarm Control Plane| W2 D2 -.->|Swarm Control Plane| W3 D1 -->|Route traffic for site-a.com| A D1 -->|Route traffic for site-b.com| B D1 -->|Route traffic for site-c.com| C D2 -->|Route traffic for site-d.com| D D2 -->|Route traffic for site-e.com| E D2 -->|Route traffic for site-f.com| F classDef lb fill:#ffd27f,stroke:#333,stroke-width:2px; classDef manager fill:#f9d,stroke:#333,stroke-width:2px; classDef worker fill:#bbf,stroke:#333,stroke-width:1px; classDef app fill:#bfb,stroke:#333,stroke-width:1px; class LB lb; class D1,D2 manager; class W1,W2,W3 worker; class A,B,C,D,E,F app;I'm I missing something or is there a better way of setting it to highly available and also scalable?
Im asking this cause I want to host my own build app and during development and preview deploys I notice that the server can start to struggle with the number deploy you do which also impacts the production apps.
my setup would have a few worker nodes with label preview_mr which would receive all the MR previews and then 2 or 3 nodes which would have a label prod which would get the productions app so that they would not interfere with each other.
I found
some topic which have might benefit from answers here
#2271
#3695
#2278
#1812
All reactions