2024-01-25 15:11:23 +08:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
services:
|
|
|
|
visualizer:
|
|
|
|
image: dockersamples/visualizer:stable
|
|
|
|
ports:
|
|
|
|
- "8001:8080"
|
|
|
|
stop_grace_period: 1m30s
|
|
|
|
volumes:
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
|
|
deploy:
|
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- 'node.role == manager'
|
2024-01-30 17:08:25 +08:00
|
|
|
networks:
|
|
|
|
- diyue-network
|
2024-01-30 17:15:41 +08:00
|
|
|
swarmpit-app:
|
|
|
|
image: swarmpit/swarmpit:latest
|
|
|
|
ports:
|
|
|
|
- "888:8080"
|
|
|
|
environment:
|
|
|
|
- SWARMPIT_DB=http://swarmpit-db:5984
|
|
|
|
- SWARMPIT_INFLUXDB=http://swarmpit-influxdb:8086
|
|
|
|
- TZ=Asia/Shanghai
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
networks:
|
|
|
|
- diyue-network
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpus: '0.50'
|
|
|
|
memory: 1024M
|
|
|
|
reservations:
|
|
|
|
cpus: '0.05'
|
|
|
|
memory: 200M
|
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- node.role == manager
|
|
|
|
swarmpit-db:
|
2024-01-30 17:26:23 +08:00
|
|
|
# image: couchdb:2.3.1
|
|
|
|
image: couchdb:latest
|
2024-01-30 17:15:41 +08:00
|
|
|
volumes:
|
|
|
|
- db-data:/opt/couchdb/data
|
|
|
|
networks:
|
|
|
|
- diyue-network
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpus: '0.30'
|
|
|
|
memory: 512M
|
|
|
|
reservations:
|
|
|
|
cpus: '0.10'
|
|
|
|
memory: 256M
|
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- node.labels.swarmpit.db-data == true
|
|
|
|
swarmpit-influxdb:
|
2024-01-30 17:26:23 +08:00
|
|
|
# image: influxdb:1.7
|
|
|
|
image: influxdb:latest
|
2024-01-30 17:15:41 +08:00
|
|
|
volumes:
|
|
|
|
- influx-data:/var/lib/influxdb
|
|
|
|
networks:
|
|
|
|
- diyue-network
|
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
reservations:
|
|
|
|
cpus: '0.1'
|
|
|
|
memory: 128M
|
|
|
|
limits:
|
|
|
|
cpus: '0.6'
|
|
|
|
memory: 512M
|
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- node.labels.swarmpit.influx-data == true
|
|
|
|
swarmpit-agent:
|
|
|
|
image: swarmpit/agent:latest
|
|
|
|
environment:
|
2024-01-30 17:25:22 +08:00
|
|
|
- DOCKER_API_VERSION=1.43
|
2024-01-30 17:15:41 +08:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
networks:
|
|
|
|
- diyue-network
|
|
|
|
deploy:
|
|
|
|
mode: global
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpus: '0.10'
|
|
|
|
memory: 64M
|
|
|
|
reservations:
|
2024-01-30 17:25:22 +08:00
|
|
|
cpus: '0.05'
|
2024-01-30 17:15:41 +08:00
|
|
|
memory: 32M
|
2024-01-30 01:23:31 +08:00
|
|
|
|
2024-01-30 11:41:27 +08:00
|
|
|
# networks:
|
|
|
|
# net:
|
|
|
|
# driver: overlay
|
|
|
|
# attachable: true
|
2024-01-30 01:23:31 +08:00
|
|
|
|
2024-01-30 17:15:41 +08:00
|
|
|
volumes:
|
|
|
|
db-data:
|
|
|
|
driver: local
|
|
|
|
influx-data:
|
|
|
|
driver: local
|
2024-01-30 01:23:31 +08:00
|
|
|
|
2024-01-30 17:08:25 +08:00
|
|
|
networks:
|
|
|
|
diyue-network:
|
|
|
|
driver: overlay
|
2024-01-30 01:23:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# portainer:
|
|
|
|
# image: portainer/portainer:latest
|
|
|
|
# ports:
|
|
|
|
# - "8002:9000"
|
|
|
|
# volumes:
|
|
|
|
# - "/var/run/docker.sock:/var/run/docker.sock"
|
|
|
|
# deploy:
|
|
|
|
# update_config:
|
|
|
|
# failure_action: rollback
|
|
|
|
# placement:
|
|
|
|
# constraints:
|
|
|
|
# - 'node.role == manager'
|