更新 docker-compose.yml

This commit is contained in:
Bryant 2024-01-30 17:50:02 +08:00
parent d7880f49ac
commit ece44cc946
1 changed files with 10 additions and 9 deletions

View File

@ -28,6 +28,11 @@ services:
- TZ=Asia/Shanghai - TZ=Asia/Shanghai
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 60s
timeout: 10s
retries: 3
networks: networks:
- diyue-network - diyue-network
deploy: deploy:
@ -36,8 +41,8 @@ services:
cpus: '0.50' cpus: '0.50'
memory: 1024M memory: 1024M
reservations: reservations:
cpus: '0.05' cpus: '0.10'
memory: 200M memory: 300M
placement: placement:
constraints: constraints:
- node.role == manager - node.role == manager
@ -59,7 +64,7 @@ services:
constraints: constraints:
- node.labels.swarmpit.db-data == true - node.labels.swarmpit.db-data == true
swarmpit-influxdb: swarmpit-influxdb:
image: influxdb:1.7 image: influxdb:1.8
# image: influxdb:latest # image: influxdb:latest
volumes: volumes:
- influx-data:/var/lib/influxdb - influx-data:/var/lib/influxdb
@ -87,6 +92,8 @@ services:
- diyue-network - diyue-network
deploy: deploy:
mode: global mode: global
labels:
swarmpit.agent: 'true'
resources: resources:
limits: limits:
cpus: '0.10' cpus: '0.10'
@ -95,11 +102,6 @@ services:
cpus: '0.05' cpus: '0.05'
memory: 32M memory: 32M
# networks:
# net:
# driver: overlay
# attachable: true
volumes: volumes:
db-data: db-data:
driver: local driver: local
@ -112,7 +114,6 @@ networks:
# portainer: # portainer:
# image: portainer/portainer:latest # image: portainer/portainer:latest
# ports: # ports: