欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

微服务架构docker-compose部署配置文件(docker-compose.yml)

程序员文章站 2022-05-14 20:42:40
...
version: '2.1'
services:
  edu_nacos:
    image: nacos-server:2.0.1
    container_name: nacos-center
    environment:
      - PREFER_HOST_MODE=hostname
      - MODE=standalone
    ports:
      - 8848:8848
      - 9848:9848
    volumes:
      - "/data/edu-online/nacos/logs:/home/nacos/logs"
      - "/data/edu-online/nacos/custom.properties:/home/nacos/init.d/custom.properties"
    logging:
      options:
        max-size: "100m"
  edu_gateway:
    image: base:v2
    container_name: gateway-center
    ports:
      - 9900:9900
    volumes:
      - "/data/edu-online/gateway/gateway-center.jar:/app.jar"
      - "/data/edu-online/gateway/logs:/logs"
    logging:
      options:
        max-size: "100m"
  edu_uaa:
    image: base:v2
    container_name: uaa-center
    ports:
      - 8000:8000
    volumes:
      - "/data/edu-online/uaa/uaa-center.jar:/app.jar"
      - "/data/edu-online/uaa/logs:/logs" 
    logging:
      options:
        max-size: "100m"
  edu_user:
    image: base:v2
    container_name: user-center
    ports:
      - 7000:7000
    volumes:
      - "/data/edu-online/user/user-center.jar:/app.jar"
      - "/data/edu-online/user/logs:/logs"
    logging:
      options:
        max-size: "100m"
  edu_account:
    image: base:v2
    container_name: account-center
    ports:
      - 7800:7800
    volumes:
      - "/data/edu-online/account/account-center.jar:/app.jar"
      - "/data/edu-online/account/logs:/logs"
    logging:
      options:
        max-size: "100m"
  edu_scheduling:
    image: base:v2
    container_name: scheduling-center
    ports:
      - 7700:7700
    volumes:
      - "/data/edu-online/scheduling/scheduling-center.jar:/app.jar"
      - "/data/edu-online/scheduling/logs:/logs"
    logging:
      options:
        max-size: "100m"
  edu_job:
    image: base:v2
    container_name: job-admin
    ports:
      - 8081:8081
    volumes:
      - "/data/edu-online/job/job-admin.jar:/app.jar"
      - "/data/edu-online/job/logs:/logs"
    logging:
      options:
        max-size: "100m"
  edu_file:
    image: base:v2
    container_name: file-center
    ports:
      - 5000:5000
    volumes:
      - "/data/edu-online/file/file-center.jar:/app.jar"
      - "/data/edu-online/file/logs:/logs"
    logging:
      options:
        max-size: "100m"
  edu_message:
    image: base:v2
    container_name: message-center
    ports:
      - 8900:8900
    volumes:
      - "/data/edu-online/message/message-center.jar:/app.jar"
      - "/data/edu-online/message/logs:/logs"
    logging:
      options:
        max-size: "100m"
  edu_nginx:
    image: nginx
    container_name: nginx-web
    ports:
      - 1080:1080
    volumes:
      - "/data/scl-web/nginx/www:/var/html"
      - "/data/scl-web/nginx/conf/nginx.conf:/etc/nginx/nginx.conf"
      - "/data/scl-web/nginx/logs:/var/log/nginx"
    logging:
      options:
        max-size: "100m"