瀏覽代碼

第四版dev

1037015548@qq.com 8 月之前
父節點
當前提交
f9e071b699
共有 1 個文件被更改,包括 76 次插入18 次删除
  1. 76 18
      dc3/docker-compose-dev.yml

+ 76 - 18
dc3/docker-compose-dev.yml

@@ -1,5 +1,5 @@
 #
-# Copyright 2016-present the IoT DC3 original author or authors.
+# Copyright 2016-present the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,10 +14,46 @@
 # limitations under the License.
 #
 
+version: '3'
+
 services:
+  register:
+    image: registry.cn-beijing.aliyuncs.com/dc3/dc3-center-register:4.0.0-nacos
+    restart: on-failure
+    ports:
+      #服务器配置
+      - "8849:8849"
+      - "9848:9848"
+      - "9555:9555"
+      #服务器配置
+      - "9849:9849"
+    environment:
+      - PREFER_HOST_MODE=hostname
+      - MODE=standalone
+      - SPRING_DATASOURCE_PLATFORM=mysql
+      - JVM_XMS=512m
+      - JVM_XMX=512m
+      - JVM_XMN=256m
+      - JVM_MS=128m
+      - JVM_MMS=256m
+    container_name: dc3-center-register
+    hostname: dc3-center-register
+    depends_on:
+      - mysql
+    volumes:
+      - logs:/home/nacos/logs
+    logging:
+      driver: json-file
+      options:
+        max-size: '20m'
+        max-file: '20'
+    networks:
+      dc3net:
+        aliases:
+          - dc3-center-register
   mysql:
     image: registry.cn-beijing.aliyuncs.com/dc3/dc3-mysql:2024.3.0.dev
-    restart: always
+    restart: on-failure
     ports:
       - '33306:3306'
     environment:
@@ -25,12 +61,11 @@ services:
     container_name: dc3-mysql
     hostname: dc3-mysql
     volumes:
-      - mysql_data:/data
-      - mysql_lib:/var/lib/mysql
+      - mysql:/var/lib/mysql
     logging:
       driver: json-file
       options:
-        max-size: '10M'
+        max-size: '20m'
         max-file: '20'
     networks:
       dc3net:
@@ -39,18 +74,18 @@ services:
 
   mongo:
     image: registry.cn-beijing.aliyuncs.com/dc3/dc3-mongo:2024.3.0.dev
-    restart: always
+    restart: on-failure
     ports:
       - '37017:27017'
     container_name: dc3-mongo
     hostname: dc3-mongo
     volumes:
-      - mongo_data:/data/db
       - mongo_config:/data/configdb
+      - mongo_db:/data/db
     logging:
       driver: json-file
       options:
-        max-size: '10M'
+        max-size: '20m'
         max-file: '20'
     networks:
       dc3net:
@@ -59,7 +94,7 @@ services:
 
   redis:
     image: registry.cn-beijing.aliyuncs.com/dc3/dc3-redis:2024.3.0.dev
-    restart: always
+    restart: on-failure
     ports:
       - '36379:6379'
     container_name: dc3-redis
@@ -69,7 +104,7 @@ services:
     logging:
       driver: json-file
       options:
-        max-size: '10M'
+        max-size: '20m'
         max-file: '20'
     networks:
       dc3net:
@@ -78,11 +113,12 @@ services:
 
   rabbitmq:
     image: registry.cn-beijing.aliyuncs.com/dc3/dc3-rabbitmq:2024.3.0.dev
-    restart: always
+    restart: on-failure
     ports:
       - '5672:5672'
-      - '2883:1883'
-      - '3883:8883'
+      - '1883:1883'
+      - '8883:8883'
+#      - '61613:61613'
       - '15672:15672'
     container_name: dc3-rabbitmq
     hostname: dc3-rabbitmq
@@ -91,22 +127,44 @@ services:
     logging:
       driver: json-file
       options:
-        max-size: '10M'
+        max-size: '20m'
         max-file: '20'
     networks:
       dc3net:
         aliases:
           - dc3-rabbitmq
 
+  portainer:
+    image: portainer/portainer:1.24.2
+    command: -H unix:///var/run/docker.sock
+    restart: on-failure
+    ports:
+      - '9000:9000'
+    container_name: portainer
+    hostname: dc3-portainer
+    volumes:
+      - portainer:/data
+      - /var/run/docker.sock:/var/run/docker.sock
+    logging:
+      driver: json-file
+      options:
+        max-size: '20m'
+        max-file: '20'
+    networks:
+      dc3net:
+        aliases:
+          - dc3-portainer
+
 volumes:
-  mysql_data:
-  mysql_lib:
-  mongo_data:
+  logs:
+  mysql:
   mongo_config:
+  mongo_db:
   redis:
   rabbitmq:
+  portainer:
 
 networks:
   dc3net:
     driver: bridge
-...
+...