From 0fb028f630785e0db7442ac3ef30bcaac90f7a6a Mon Sep 17 00:00:00 2001 From: Bryant Date: Tue, 30 Jan 2024 01:23:31 +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 | 117 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 107 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index dffa73b..aa153ef 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,15 +14,112 @@ services: placement: constraints: - 'node.role == manager' - portainer: - image: portainer/portainer:latest + app: + image: swarmpit/swarmpit:latest ports: - - "8002:9000" - volumes: - - "/var/run/docker.sock:/var/run/docker.sock" - deploy: - update_config: - failure_action: rollback + - "888:888" + environment: + - SWARMPIT_DB=http://db:5984 + - SWARMPIT_INFLUXDB=http://influxdb:8086 + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + networks: + - net + - traefik-public + deploy: + resources: + limits: + cpus: '0.50' + memory: 1024M + reservations: + cpus: '0.25' + memory: 512M placement: - constraints: - - 'node.role == manager' \ No newline at end of file + constraints: + - node.role == manager + db: + image: couchdb:2.3.1 + volumes: + - db-data:/opt/couchdb/data + networks: + - net + deploy: + resources: + limits: + cpus: '0.30' + memory: 512M + reservations: + cpus: '0.15' + memory: 256M + placement: + constraints: + - node.labels.swarmpit.db-data == true + influxdb: + image: influxdb:1.7 + volumes: + - influx-data:/var/lib/influxdb + networks: + - net + deploy: + resources: + reservations: + cpus: '0.3' + memory: 128M + limits: + cpus: '0.6' + memory: 512M + placement: + constraints: + - node.labels.swarmpit.influx-data == true + agent: + image: swarmpit/agent:latest + environment: + - DOCKER_API_VERSION=1.35 + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + networks: + - net + deploy: + mode: global + resources: + limits: + cpus: '0.10' + memory: 64M + reservations: + cpus: '0.05' + memory: 32M + +networks: + net: + driver: overlay + attachable: true + traefik-public: + external: true + +volumes: + db-data: + driver: local + influx-data: + driver: local + + + + + + + + + + + # 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' \ No newline at end of file