|
|
@@ -0,0 +1,204 @@
|
|
|
+services:
|
|
|
+ tnbgateway:
|
|
|
+ image: registry.cn-chengdu.aliyuncs.com/tnb028/tnbgateway
|
|
|
+ container_name: tnbgateway
|
|
|
+ restart: always
|
|
|
+ network_mode: host
|
|
|
+ environment:
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=127.0.0.1:8848
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_USERNAME=nacos
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_PASSWORD=Test_123456
|
|
|
+ # 告诉 JVM 自动根据容器限制来计算堆内存(重要!)
|
|
|
+ - JAVA_TOOL_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
|
|
|
+ volumes:
|
|
|
+ - /etc/localtime:/etc/localtime:ro
|
|
|
+ deploy:
|
|
|
+ resources:
|
|
|
+ limits:
|
|
|
+ cpus: '2.0' # 最多使用 2 核 CPU
|
|
|
+ memory: 2048M # 最多使用 2G 内存
|
|
|
+ reservations:
|
|
|
+ cpus: '0.5' # 宿主机最少为该容器保留 0.5 核
|
|
|
+ memory: 1024M # 宿主机最少为该容器保留 1G 内存
|
|
|
+ logging:
|
|
|
+ driver: "json-file"
|
|
|
+ options:
|
|
|
+ max-size: "10m"
|
|
|
+ max-file: "1"
|
|
|
+ tnbauth:
|
|
|
+ image: registry.cn-chengdu.aliyuncs.com/tnb028/tnbauth
|
|
|
+ container_name: tnbauth
|
|
|
+ restart: always
|
|
|
+ network_mode: host
|
|
|
+ environment:
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=127.0.0.1:8848
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_USERNAME=nacos
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_PASSWORD=Test_123456
|
|
|
+ # 告诉 JVM 自动根据容器限制来计算堆内存(重要!)
|
|
|
+ - JAVA_TOOL_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
|
|
|
+ volumes:
|
|
|
+ - /etc/localtime:/etc/localtime:ro
|
|
|
+ deploy:
|
|
|
+ resources:
|
|
|
+ limits:
|
|
|
+ cpus: '2.0' # 最多使用 2 核 CPU
|
|
|
+ memory: 2048M # 最多使用 2G 内存
|
|
|
+ reservations:
|
|
|
+ cpus: '0.5' # 宿主机最少为该容器保留 0.5 核
|
|
|
+ memory: 1024M # 宿主机最少为该容器保留 1G 内存
|
|
|
+ logging:
|
|
|
+ driver: "json-file"
|
|
|
+ options:
|
|
|
+ max-size: "10m"
|
|
|
+ max-file: "1"
|
|
|
+ tnbmessage:
|
|
|
+ image: registry.cn-chengdu.aliyuncs.com/tnb028/tnbmessage
|
|
|
+ container_name: tnbmessage
|
|
|
+ restart: always
|
|
|
+ network_mode: host
|
|
|
+ environment:
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=127.0.0.1:8848
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_USERNAME=nacos
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_PASSWORD=Test_123456
|
|
|
+ # 告诉 JVM 自动根据容器限制来计算堆内存(重要!)
|
|
|
+ - JAVA_TOOL_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
|
|
|
+ volumes:
|
|
|
+ - /etc/localtime:/etc/localtime:ro
|
|
|
+ deploy:
|
|
|
+ resources:
|
|
|
+ limits:
|
|
|
+ cpus: '2.0' # 最多使用 2 核 CPU
|
|
|
+ memory: 2048M # 最多使用 2G 内存
|
|
|
+ reservations:
|
|
|
+ cpus: '0.5' # 宿主机最少为该容器保留 0.5 核
|
|
|
+ memory: 1024M # 宿主机最少为该容器保留 1G 内存
|
|
|
+ logging:
|
|
|
+ driver: "json-file"
|
|
|
+ options:
|
|
|
+ max-size: "10m"
|
|
|
+ max-file: "1"
|
|
|
+ tnbfile:
|
|
|
+ image: registry.cn-chengdu.aliyuncs.com/tnb028/tnbfile
|
|
|
+ container_name: tnbfile
|
|
|
+ restart: always
|
|
|
+ network_mode: host
|
|
|
+ environment:
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=127.0.0.1:8848
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_USERNAME=nacos
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_PASSWORD=Test_123456
|
|
|
+ # 告诉 JVM 自动根据容器限制来计算堆内存(重要!)
|
|
|
+ - JAVA_TOOL_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
|
|
|
+ volumes:
|
|
|
+ - /etc/localtime:/etc/localtime:ro
|
|
|
+ deploy:
|
|
|
+ resources:
|
|
|
+ limits:
|
|
|
+ cpus: '2.0' # 最多使用 2 核 CPU
|
|
|
+ memory: 2048M # 最多使用 2G 内存
|
|
|
+ reservations:
|
|
|
+ cpus: '0.5' # 宿主机最少为该容器保留 0.5 核
|
|
|
+ memory: 1024M # 宿主机最少为该容器保留 1G 内存
|
|
|
+ logging:
|
|
|
+ driver: "json-file"
|
|
|
+ options:
|
|
|
+ max-size: "10m"
|
|
|
+ max-file: "1"
|
|
|
+ tnbuser:
|
|
|
+ image: registry.cn-chengdu.aliyuncs.com/tnb028/tnbuser
|
|
|
+ container_name: tnbuser
|
|
|
+ restart: always
|
|
|
+ network_mode: host
|
|
|
+ environment:
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=127.0.0.1:8848
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_USERNAME=nacos
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_PASSWORD=Test_123456
|
|
|
+ # 告诉 JVM 自动根据容器限制来计算堆内存(重要!)
|
|
|
+ - JAVA_TOOL_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
|
|
|
+ volumes:
|
|
|
+ - /etc/localtime:/etc/localtime:ro
|
|
|
+ deploy:
|
|
|
+ resources:
|
|
|
+ limits:
|
|
|
+ cpus: '2.0' # 最多使用 2 核 CPU
|
|
|
+ memory: 2048M # 最多使用 2G 内存
|
|
|
+ reservations:
|
|
|
+ cpus: '0.5' # 宿主机最少为该容器保留 0.5 核
|
|
|
+ memory: 1024M # 宿主机最少为该容器保留 1G 内存
|
|
|
+ logging:
|
|
|
+ driver: "json-file"
|
|
|
+ options:
|
|
|
+ max-size: "10m"
|
|
|
+ max-file: "1"
|
|
|
+ tnbcontent:
|
|
|
+ image: registry.cn-chengdu.aliyuncs.com/tnb028/tnbcontent
|
|
|
+ container_name: tnbcontent
|
|
|
+ restart: always
|
|
|
+ network_mode: host
|
|
|
+ environment:
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=127.0.0.1:8848
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_USERNAME=nacos
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_PASSWORD=Test_123456
|
|
|
+ # 告诉 JVM 自动根据容器限制来计算堆内存(重要!)
|
|
|
+ - JAVA_TOOL_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
|
|
|
+ volumes:
|
|
|
+ - /etc/localtime:/etc/localtime:ro
|
|
|
+ deploy:
|
|
|
+ resources:
|
|
|
+ limits:
|
|
|
+ cpus: '2.0' # 最多使用 2 核 CPU
|
|
|
+ memory: 2048M # 最多使用 2G 内存
|
|
|
+ reservations:
|
|
|
+ cpus: '0.5' # 宿主机最少为该容器保留 0.5 核
|
|
|
+ memory: 1024M # 宿主机最少为该容器保留 1G 内存
|
|
|
+ logging:
|
|
|
+ driver: "json-file"
|
|
|
+ options:
|
|
|
+ max-size: "10m"
|
|
|
+ max-file: "1"
|
|
|
+ tnbsearch:
|
|
|
+ image: registry.cn-chengdu.aliyuncs.com/tnb028/tnbsearch
|
|
|
+ container_name: tnbsearch
|
|
|
+ restart: always
|
|
|
+ network_mode: host
|
|
|
+ environment:
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_SERVER_ADDR=127.0.0.1:8848
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_USERNAME=nacos
|
|
|
+ - SPRING_CLOUD_NACOS_CONFIG_PASSWORD=Test_123456
|
|
|
+ # 告诉 JVM 自动根据容器限制来计算堆内存(重要!)
|
|
|
+ - JAVA_TOOL_OPTIONS=-XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0
|
|
|
+ volumes:
|
|
|
+ - /etc/localtime:/etc/localtime:ro
|
|
|
+ deploy:
|
|
|
+ resources:
|
|
|
+ limits:
|
|
|
+ cpus: '2.0' # 最多使用 2 核 CPU
|
|
|
+ memory: 2048M # 最多使用 2G 内存
|
|
|
+ reservations:
|
|
|
+ cpus: '0.5' # 宿主机最少为该容器保留 0.5 核
|
|
|
+ memory: 1024M # 宿主机最少为该容器保留 1G 内存
|
|
|
+ logging:
|
|
|
+ driver: "json-file"
|
|
|
+ options:
|
|
|
+ max-size: "10m"
|
|
|
+ max-file: "1"
|
|
|
+ tnbapp:
|
|
|
+ image: registry.cn-chengdu.aliyuncs.com/tnb028/tnbapp
|
|
|
+ container_name: tnbapp
|
|
|
+ restart: always
|
|
|
+ network_mode: host
|
|
|
+ environment:
|
|
|
+ - APP_OPS_ROOT=/opt/data/devops_data
|
|
|
+ volumes:
|
|
|
+ - /etc/localtime:/etc/localtime:ro
|
|
|
+ deploy:
|
|
|
+ resources:
|
|
|
+ limits:
|
|
|
+ cpus: '1.0'
|
|
|
+ memory: 128MB
|
|
|
+ reservations:
|
|
|
+ memory: 64MB
|
|
|
+ logging:
|
|
|
+ driver: "json-file"
|
|
|
+ options:
|
|
|
+ max-size: "10m"
|
|
|
+ max-file: "1"
|