From 44adbaf5468af4b7295a7422e4c1e81c59aa9ae6 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 23 八月 2024 21:02:16 +0800 Subject: [PATCH] 1 --- docker-compose/docker-compose.yml | 214 +++++++++++++++++++++++++---------------------------- 1 files changed, 102 insertions(+), 112 deletions(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index c79f239..ffd797f 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -1,32 +1,15 @@ version : '3.8' services: - se-nacos: - container_name: se-nacos - image: nacos/nacos-server:2.3.2 - build: - context: ./nacos - environment: - - MODE=standalone - volumes: - - ./nacos/logs/:/home/nacos/logs - - ./nacos/conf/application.properties:/home/nacos/conf/application.properties - ports: - - "8848:8848" - - "9848:9848" - - "9849:9849" - depends_on: - - se-mysql + # mysql se-mysql: - container_name: se-mysql image: mysql:5.7 - build: - context: ./mysql ports: - - "3306:3306" + - 3307:3306 volumes: - - ./mysql/conf:/etc/mysql/conf.d - ./mysql/logs:/logs - ./mysql/data:/var/lib/mysql + - ./mysql/conf:/etc/mysql/conf.d + - ./mysql/initdb:/docker-entrypoint-initdb.d command: [ 'mysqld', '--innodb-buffer-pool-size=80M', @@ -36,105 +19,112 @@ '--lower-case-table-names=1' ] environment: - MYSQL_DATABASE: 'ry-cloud' - MYSQL_ROOT_PASSWORD: password + TZ: Asia/Shanghai + MYSQL_DATABASE: 'se-cloud' + MYSQL_ROOT_PASSWORD: My_Sql_s!E_v5.7 + networks: + - network-se + restart: always + # nacos + se-nacos: + image: nacos/nacos-server:v2.4.1 + environment: + MODE: standalone + TZ: Asia/Shanghai + volumes: + - ./nacos/logs/:/home/nacos/logs + - ./nacos/conf/application.properties:/home/nacos/conf/application.properties + ports: + - 8848:8848 + - 9848:9848 + - 9849:9849 + depends_on: + - se-mysql + networks: + - network-se + restart: always + # redis,Redis_s!E_6.2.6 se-redis: - container_name: se-redis image: redis:latest - build: - context: ./redis ports: - - "6379:6379" + - 6379:6379 volumes: - - ./redis/conf/redis.conf:/home/se/redis/redis.conf + - ./redis/data/redis.conf:/data/redis.conf - ./redis/data:/data - command: redis-server /home/se/redis/redis.conf - se-nginx: - container_name: se-nginx - image: nginx:latest - build: - context: ./nginx + command: redis-server /data/redis.conf + networks: + - network-se + restart: always + # gateway + se-gateway: + image: openjdk:8-jre ports: - - "80:80" + - 9204:8080 volumes: - - ./nginx/html/dist:/home/se/projects/se-ui - - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf + - ./gateway:/data + environment: + TZ: Asia/Shanghai + entrypoint: java -jar /data/se-gateway.jar --spring.config.location=file:/data/ + depends_on: + - se-redis + - se-nacos + links: + - se-redis + - se-nacos + networks: + - network-se + restart: always + # auth + se-auth: + image: openjdk:8-jre + ports: + - 9200:9200 + volumes: + - ./auth:/data + environment: + TZ: Asia/Shanghai + entrypoint: java -jar /data/se-auth.jar --spring.config.location=file:/data/ + depends_on: + - se-redis + - se-nacos + networks: + - network-se + restart: always + # system + se-system: + image: openjdk:8-jre + ports: + - 9201:9201 + volumes: + - ./system:/data + environment: + TZ: Asia/Shanghai + entrypoint: java -jar /data/se-modules-system.jar --spring.config.location=file:/data/ + depends_on: + - se-redis + - se-nacos + - se-mysql + networks: + - network-se + restart: always + # nginx + se-nginx: + image: nginx:latest + ports: + - 8090:80 + environment: + TZ: Asia/Shanghai + volumes: - ./nginx/logs:/var/log/nginx - ./nginx/conf.d:/etc/nginx/conf.d + - ./nginx/html:/usr/share/nginx/html + - ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf depends_on: - se-gateway - links: - - se-gateway - se-gateway: - container_name: se-gateway - build: - context: ./se/gateway - dockerfile: dockerfile - ports: - - "8080:8080" - depends_on: - - se-redis - links: - - se-redis - se-auth: - container_name: se-auth - build: - context: ./se/auth - dockerfile: dockerfile - ports: - - "9200:9200" - depends_on: - - se-redis - links: - - se-redis - se-modules-system: - container_name: se-modules-system - build: - context: ./se/modules/system - dockerfile: dockerfile - ports: - - "9201:9201" - depends_on: - - se-redis - - se-mysql - links: - - se-redis - - se-mysql - se-modules-gen: - container_name: se-modules-gen - build: - context: ./se/modules/gen - dockerfile: dockerfile - ports: - - "9202:9202" - depends_on: - - se-mysql - links: - - se-mysql - se-modules-job: - container_name: se-modules-job - build: - context: ./se/modules/job - dockerfile: dockerfile - ports: - - "9203:9203" - depends_on: - - se-mysql - links: - - se-mysql - se-modules-file: - container_name: se-modules-file - build: - context: ./se/modules/file - dockerfile: dockerfile - ports: - - "9300:9300" - volumes: - - ./se/uploadPath:/home/se/uploadPath - se-visual-monitor: - container_name: se-visual-monitor - build: - context: ./se/visual/monitor - dockerfile: dockerfile - ports: - - "9100:9100" + networks: + - network-se + restart: always +# networks +networks: + network-se: + driver: bridge -- Gitblit v1.9.3