更新 docker-compose.yml

This commit is contained in:
Bryant 2024-01-30 17:08:25 +08:00
parent 7973a31558
commit eb1be8df71
1 changed files with 84 additions and 83 deletions

View File

@ -14,97 +14,98 @@ services:
placement: placement:
constraints: constraints:
- 'node.role == manager' - 'node.role == manager'
# app: networks:
# image: swarmpit/swarmpit:latest - diyue-network
# ports: app:
# - "888:8080" image: swarmpit/swarmpit:latest
# environment: ports:
# - SWARMPIT_DB=http://db:5984 - "888:8080"
# - SWARMPIT_INFLUXDB=http://influxdb:8086 environment:
# - TZ=Asia/Shanghai - SWARMPIT_DB=http://db:5984
# volumes: - SWARMPIT_INFLUXDB=http://influxdb:8086
# - /var/run/docker.sock:/var/run/docker.sock:ro - TZ=Asia/Shanghai
# networks: volumes:
# - net - /var/run/docker.sock:/var/run/docker.sock:ro
# deploy: networks:
# resources: - diyue-network
# limits: deploy:
# cpus: '0.50' resources:
# memory: 1024M limits:
# reservations: cpus: '0.50'
# cpus: '0.25' memory: 1024M
# memory: 512M reservations:
# placement: cpus: '0.05'
# constraints: memory: 200M
# - node.role == manager placement:
# db: constraints:
# image: couchdb:2.3.1 - node.role == manager
# volumes: db:
# - db-data:/opt/couchdb/data image: couchdb:2.3.1
# networks: volumes:
# - net - db-data:/opt/couchdb/data
# deploy: networks:
# resources: - diyue-network
# limits: deploy:
# cpus: '0.30' resources:
# memory: 512M limits:
# reservations: cpus: '0.30'
# cpus: '0.15' memory: 512M
# memory: 256M reservations:
# placement: cpus: '0.10'
# constraints: memory: 256M
# - node.labels.swarmpit.db-data == true placement:
# influxdb: constraints:
# image: influxdb:1.7 - node.labels.swarmpit.db-data == true
# volumes: influxdb:
# - influx-data:/var/lib/influxdb image: influxdb:1.7
# networks: volumes:
# - net - influx-data:/var/lib/influxdb
# deploy: networks:
# resources: - diyue-network
# reservations: deploy:
# cpus: '0.3' resources:
# memory: 128M reservations:
# limits: cpus: '0.1'
# cpus: '0.6' memory: 128M
# memory: 512M limits:
# placement: cpus: '0.6'
# constraints: memory: 512M
# - node.labels.swarmpit.influx-data == true placement:
# agent: constraints:
# image: swarmpit/agent:latest - node.labels.swarmpit.influx-data == true
# environment: agent:
# - DOCKER_API_VERSION=1.35 image: swarmpit/agent:latest
# volumes: environment:
# - /var/run/docker.sock:/var/run/docker.sock:ro - DOCKER_API_VERSION=1.35
# networks: volumes:
# - net - /var/run/docker.sock:/var/run/docker.sock:ro
# deploy: networks:
# mode: global - diyue-network
# resources: deploy:
# limits: mode: global
# cpus: '0.10' resources:
# memory: 64M limits:
# reservations: cpus: '0.10'
# cpus: '0.05' memory: 64M
# memory: 32M reservations:
cpus: '0.05'
memory: 32M
# networks: # networks:
# net: # net:
# driver: overlay # driver: overlay
# attachable: true # attachable: true
# volumes: volumes:
# db-data: db-data:
# driver: local driver: local
# influx-data: influx-data:
# driver: local driver: local
networks:
diyue-network:
driver: overlay