Skip to content

简介

教程

1 环境准备

2 镜像下载安装

  1. 安装完成docker后,登录纵横私有harbor仓库,输入命令:docker login harbor.jouav.com
  2. 根据提示输入账号密码,
  3. 登陆成功后,拉取镜像,输入命令:docker pull harbor.jouav.com/open/joedge:latest
  4. 查看镜像下载成功与否,输入命令:docker images,若镜像列表中存在新拉取的镜像,则代表拉取成功,反之则重新执行前面流程。
  5. 附带边应用平台Windows版本下载链接:https://developer.jouavcloud.com/joedge/

3 运行

  1. 镜像下载完成后,执行docker-compose脚本,其中端口号映射可根据实际情况调整,若按照该命令,对外暴露端口为803及1883
yaml
version: "2"
services:
  joge:
    image: harbor.jouav.com/open/joedge:latest
    restart: always
    container_name: PRD-jocloud-joge
    hostname: PRD-jocloud-joge
    ports:
      - "803:80"
      - "1883:1883"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./JoEdge.json:/opt/joedge/bin/JoEdge.json

JoEdge.json文件(具体配置可根据实际修改,参考协议文档):

json
{
  "hook": {
    "admin_params": "secret=035c73f7-bb6b-4889-a715-d9eb2d1925dd",
    "alive_interval": 30,
    "enable": false,
    "on_exception_happen": "http://127.0.0.1/index/api/on_exception_happen",
    "on_server_keepalive": "http://127.0.0.1/index/api/on_server_keepalive",
    "on_server_started": "http://127.0.0.1/index/api/on_server_started",
    "retry": 1,
    "retry_delay": 3,
    "timeoutSec": 10
  },
  "http": {
    "apiDebug": true,
    "port": "80",
    "sslport": "443"
  },
  "mqtt": {
    "client_id": "jouav-GCS111",
    "pawsswd": "123456",
    "qos": 2,
    "server_uri": "123.249.36.115:1883",
    "user_name": "jouav"
  },
  "openSSL": {
    "server": {
      "caConfig": "${application.configDir}rootcert.pem",
      "cacheSessions": true,
      "cipherList": "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH",
      "extendedVerification": false,
      "invalidCertificateHandler": {
        "name": "AcceptCertificateHandler"
      },
      "loadDefaultCAFile": true,
      "privateKeyFile": "${application.configDir}any.pem",
      "privateKeyPassphraseHandler": {
        "name": "KeyFileHandler",
        "options": {
          "password": "secret"
        }
      },
      "requireTLSv1": false,
      "sessionCacheSize": 100,
      "sessionIdContext": "${application.name}",
      "verificationDepth": 9,
      "verificationMode": "relaxed"
    }
  },
  "rpc": {
    "port": "9527"
  },
  "services": {
    "enable_sms": false
  }
}