version: '2'
services:
  ui:
    image: registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-ui-antd:1.1.1-RELEASE
    container_name: jetlinks-ce-ui
    ports:
      - 9000:80
    environment:
      - "API_BASE_PATH=http://jetlinks:8848/" #API根路径
    volumes:
      - "jetlinks-upload-volume:/usr/share/nginx/html/upload"
    links:
      - jetlinks:jetlinks
  jetlinks:
    image: registry.cn-shenzhen.aliyuncs.com/jetlinks/jetlinks-standalone:1.2-SNAPSHOT
    container_name: jetlinks-ce
    ports:
      - 8848:8848 # API端口
      - 1883:1883 # MQTT端口
      - 8000:8000 # 预留
      - 8001:8001 # 预留
      - 8002:8002 # 预留
      - 9000:9000 # elasticsearch
      - 6379:6379 # redis
    volumes:
      - "jetlinks-upload-volume:/static/upload"  # 持久化上传的文件
      - "jetlinks-data-volume:/data"
    environment:
     # - "JAVA_OPTS=-Xms4g -Xmx18g -XX:+UseG1GC"
      - "spring.profiles.active=dev,embedded" #使用dev和embedded环境.
      - "hsweb.file.upload.static-location=http://127.0.0.1:8848/upload"  #上传的静态文件访问根地址,为ui的地址.
      - "logging.level.io.r2dbc=warn"
      - "logging.level.org.springframework.data=warn"
      - "logging.level.org.springframework=warn"
      - "logging.level.org.jetlinks=warn"
      - "logging.level.org.hswebframework=warn"
      - "logging.level.org.springframework.data.r2dbc.connectionfactory=warn"
volumes:
  jetlinks-upload-volume:
  jetlinks-data-volume: