Skip to content

Commit

Permalink
Merge pull request #206 from Dokploy/feat/add-constraints-dokploy-ser…
Browse files Browse the repository at this point in the history
…vices

refactor(setup): add constraints to dokploy services
  • Loading branch information
Siumauricio authored Jul 11, 2024
2 parents 9d0edd8 + eabe14e commit 54c70ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/setup/postgres-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export const initializePostgres = async () => {
RestartPolicy: {
Condition: "on-failure",
},
Placement: {
Constraints: ["node.role==manager"],
},
},
Mode: {
Replicated: {
Expand Down
3 changes: 3 additions & 0 deletions server/setup/redis-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export const initializeRedis = async () => {
RestartPolicy: {
Condition: "on-failure",
},
Placement: {
Constraints: ["node.role==manager"],
},
},
Mode: {
Replicated: {
Expand Down
3 changes: 3 additions & 0 deletions server/setup/registry-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export const initializeRegistry = async (
RestartPolicy: {
Condition: "on-failure",
},
Placement: {
Constraints: ["node.role==manager"],
},
},
Mode: {
Replicated: {
Expand Down
3 changes: 3 additions & 0 deletions server/setup/traefik-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export const initializeTraefik = async () => {
RestartPolicy: {
Condition: "on-failure",
},
Placement: {
Constraints: ["node.role==manager"],
},
},
Mode: {
Replicated: {
Expand Down

0 comments on commit 54c70ff

Please sign in to comment.