From ece44cc946eb782f5731be2c02e567047fb73167 Mon Sep 17 00:00:00 2001 From: Bryant Date: Tue, 30 Jan 2024 17:50:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20docker-compose.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9e18dea..ab181aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,11 @@ services: - TZ=Asia/Shanghai volumes: - /var/run/docker.sock:/var/run/docker.sock:ro + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080"] + interval: 60s + timeout: 10s + retries: 3 networks: - diyue-network deploy: @@ -36,8 +41,8 @@ services: cpus: '0.50' memory: 1024M reservations: - cpus: '0.05' - memory: 200M + cpus: '0.10' + memory: 300M placement: constraints: - node.role == manager @@ -59,7 +64,7 @@ services: constraints: - node.labels.swarmpit.db-data == true swarmpit-influxdb: - image: influxdb:1.7 + image: influxdb:1.8 # image: influxdb:latest volumes: - influx-data:/var/lib/influxdb @@ -87,6 +92,8 @@ services: - diyue-network deploy: mode: global + labels: + swarmpit.agent: 'true' resources: limits: cpus: '0.10' @@ -95,11 +102,6 @@ services: cpus: '0.05' memory: 32M -# networks: -# net: -# driver: overlay -# attachable: true - volumes: db-data: driver: local @@ -112,7 +114,6 @@ networks: - # portainer: # image: portainer/portainer:latest # ports: