From d209c360dbe821c868b3eab6950cae9fc5dae1c7 Mon Sep 17 00:00:00 2001 From: Amadeus Date: Thu, 2 May 2024 21:57:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E9=A1=B5=E9=9D=A2=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/example/docker-compose.yaml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/java/com/example/docker-compose.yaml diff --git a/src/main/java/com/example/docker-compose.yaml b/src/main/java/com/example/docker-compose.yaml new file mode 100644 index 0000000..24943a9 --- /dev/null +++ b/src/main/java/com/example/docker-compose.yaml @@ -0,0 +1,29 @@ +version: '3' +services: + nginx: + image: nginx + ports: + - 8888:80 + deploy: + mode: replicated + replicas: 3 + visualizer: + image: dockersamples/visualizer + ports: + - 8080:8080 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + deploy: + replicas: 1 + placement: + constraints: [node.repo == manager] + portainer: + image: portainer/portainer + ports: + - 9000:9000 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + deploy: + replicas: 1 + placement: + constraints: [node.role == manager] \ No newline at end of file