docker-swarm-visualizer/docker-compose.yml

127 lines
2.8 KiB
YAML
Raw Normal View History

2024-01-25 15:11:23 +08:00
version: "3.8"
services:
visualizer:
2024-01-30 17:40:40 +08:00
image: dockersamples/visualizer:latest
2024-01-25 15:11:23 +08:00
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
2024-01-30 17:50:02 +08:00
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 60s
timeout: 10s
retries: 3
2024-01-30 17:15:41 +08:00
networks:
- diyue-network
deploy:
resources:
limits:
cpus: '0.50'
memory: 1024M
reservations:
2024-02-05 17:09:26 +08:00
cpus: '0.05'
memory: 200M
2024-01-30 17:15:41 +08:00
placement:
constraints:
- node.role == manager
swarmpit-db:
2024-01-30 17:31:00 +08:00
image: couchdb:2.3.1
2024-02-05 17:09:26 +08:00
hostname: swarmpit-db
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:50:02 +08:00
image: influxdb:1.8
2024-02-05 17:09:26 +08:00
hostname: swarmpit-influxdb
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
2024-01-30 17:50:02 +08:00
labels:
swarmpit.agent: 'true'
2024-01-30 17:15:41 +08:00
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 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-02-04 17:49:04 +08:00
attachable: true
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'