Browse Source

add cloud info

master
zeus 3 years ago
parent
commit
5bab5a0834
  1. 29
      CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc

29
CloudComputing_Lab/modules/ROOT/pages/docker-compose.adoc

@ -21,9 +21,36 @@ services:
delay: 10s delay: 10s
max_attempts: 10 max_attempts: 10
window: 60s window: 60s
replicas: 1
placement: placement:
constraints: constraints:
- node.labels.myapp==true //<6> - 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: mybrowser:
image: nginx:1.17.9-alpine image: nginx:1.17.9-alpine
@ -62,6 +89,8 @@ networks:
<5> Network to Use <5> Network to Use
<6> Node Placement <6> Node Placement
<7> Start server <7> Start server
<8> Resources config
<9> Restart policy

Loading…
Cancel
Save