From 64819c0d6f7452a76fad7a2d6b56cfa8a9d24d39 Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Tue, 23 Jun 2026 10:22:11 +0200 Subject: [PATCH] constraints --- swarm/docker-stack.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/swarm/docker-stack.yml b/swarm/docker-stack.yml index d9029e4..374fa4a 100644 --- a/swarm/docker-stack.yml +++ b/swarm/docker-stack.yml @@ -7,6 +7,9 @@ services: replicas: 1 restart_policy: condition: on-failure + placement: + constraints: + - node.labels.role == worker environment: MYSQL_ROOT_PASSWORD: wordpress MYSQL_DATABASE: wordpress @@ -35,6 +38,9 @@ services: replicas: 3 restart_policy: condition: on-failure + placement: + constraints: + - node.labels.role == worker volumes: db_data: