From 5bab5a0834e100ff313ab8711e0922bddd18cf95 Mon Sep 17 00:00:00 2001 From: zeus Date: Fri, 4 Mar 2022 14:45:53 +0200 Subject: [PATCH] add cloud info --- .../modules/ROOT/pages/docker-compose.adoc | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc b/CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc index 2c449f9..d0b63a2 100644 --- a/CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc +++ b/CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc @@ -21,9 +21,36 @@ services: delay: 10s max_attempts: 10 window: 60s + replicas: 1 placement: constraints: - node.labels.myapp==true //<6> + resources: //<8> + limits: + cpus: '0.50' + memory: 500M + reservations: + cpus: '0.25' + memory: 200M + restart_policy: //<9> + condition: on-failure + delay: 5s + max_attempts: 5 + window: 120s + update_config: + parallelism: 2 + delay: 10s + order: stop-first + environment: + - MYPASSWORD=${PASSWORD} + - NODENAME={{.Node.Hostname}} + - NODEID={{.Node.ID}} + - SERVICEID={{.Service.ID}} + - SERVICENAME={{.Service.Name}} + - TASKID={{.Task.ID}} + - TASKNAME={{.Task.Name}} + - TASKREPID={{.Task.Slot}} + mybrowser: image: nginx:1.17.9-alpine @@ -62,6 +89,8 @@ networks: <5> Network to Use <6> Node Placement <7> Start server +<8> Resources config +<9> Restart policy