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: