无代码docker启动说明

1. 安装docker

1.1 Linux内核系统

1.1.1 检查防火墙(以CentOS7为例)

查看防火墙是否开启

systemctl status firewalld

如防火墙处于开启状态,有2种处理方式,选择其中一种,开发环境如内网环境建议选择处理方案1

处理方案1:停止防火墙

systemctl stop firewalld

处理方案2:开放docker镜像内置中间件透出的端口

  • 88:web访问端口
  • 8099:后端Java服务端口
  • 19876:rocketmq的namesrv端口:
  • 6378:缓存redis的端口
  • 3307:数据库mysql的端口
  • 2182:zookeeper的端口
  • 20880:dubbo的通信端口
  • 15555:预留Java的debug端口
  • 10991:rocketmq的broker端口
    查看防火墙已经开放的端口

    firewall-cmd --list-ports

    # 防火墙新增开放端口示例:
    firewall-cmd --permanent --zone=public --add-port=88/tcp
    #新增以后生效需要重新加载防火墙
    systemctl reload firewalld
    #查看端口是否开放成功
    firewall-cmd --list-ports
    也可以从外部使用telnet命令检查端口是否开放成功,如telnet 192.168.0.121 3307

    1.1.2 官方安装地址:https://docs.docker.com/engine/install/centos/

    #删除原有版本
    yum remove docker \
            docker-client \
            docker-client-latest \
            docker-common \
            docker-latest \
            docker-latest-logrotate \
            docker-logrotate \
            docker-engine
    yum install -y yum-utils
    yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    如果docker这个源异常可以用阿里云的源 
    #yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
    #启动docker
    systemctl start docker
    #查看是否安装成功
    docker -v

    1.1.3 可使用一键安装脚本

    wget https://pamirs.oss-cn-hangzhou.aliyuncs.com/docker/quick-install.sh
    sh quick-install.sh

    1.2 无公网环境Linux系统

    需要根据指定的版本以及内核架构来生成对应docker以及镜像包

    1.3 window环境

    https://docs.docker.com/desktop/install/windows-install/

2. 解压提供的部署.zip

部署.zip包含:

  • settings-3.6.3.xml:拉取平台jar的maven仓库settings,对应maven版本3.6.x
  • settings-3.8.x.xml:拉取平台jar的maven仓库settings,对应maven版本3.8.x
  • pamirs-demo:后端示例工程
  • oinone-op-ds-all-full:包含所有中间件及前后端工程,用于启动docker脚本
  • oinone-op-ds-all-mini:仅包含前后端工程,用于启动docker脚本
  • license:平台证书
  • docker和mvn账号信息.md

3. 对应版本的docker镜像拉取

镜像地址 镜像概述
harbor.oinone.top/oinone/designer:4.8.2.4-allinone-full 包含所有中间件及前后端工程
harbor.oinone.top/oinone/designer:4.8.2.4-allinone-mini 仅包含前后端工程

👆🏻上面镜像地址中的4.7.9是示例版本号,具体安装时根据数式提供的为准。

#注意:docker镜像拉取的账号密码在部署.zip里面
docker login --username=用户名 harbor.oinone.top
docker pull harbor.oinone.top/oinone/designer:xxx

4. 修改startup.sh中的路径

4.1 linux环境修改参数

在文件中找到如下
configDir=/opt/docker/oinone-op-ds-all-full
version=4.8.2.4
IP=192.168.0.121

  • 修改configDir的路径(下载oinone-op-ds-xx.zip解压后的路径)
  • 修改对应的镜像版本号
  • 修改对应的IP为docker宿主机IP

4.2 window环境修改参数

在文件中找到如下
set configDir=/d/shushi/docker/oinone-op-ds-all-full
set version=4.8.2.4
set IP=192.168.0.121

  • 修改configDir的路径((下载oinone-op-ds-xx.zip解压后的路径)
  • 修改对应的镜像版本号
  • 修改对应的IP为docker宿主机IP

5. (用oinone-op-ds-all-full版本可跳过)修改conf/application.yml

  • 对应中间件的配置:指定对应IP和端口或密码,把其中192.168.0.121改为宿主机IP
    • zookeeper
    • mysql
    • rocket-mq
    • redis
    • 阿里云oss配置

6. 修改mq/broker.conf(**注意:使用allinone-full包含中间件版本)

修改其中brokerIP1的IP从192.168.0.121改成宿主机IP

brokerClusterName = DefaultCluster
namesrvAddr=127.0.0.1:9876
brokerIP1=192.168.0.121
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
autoCreateTopicEnable=true
listenPort=10991
transactionCheckInterval=1000
#存储使用率阀值,当使用率超过阀值时,将拒绝发送消息请求
diskMaxUsedSpaceRatio=98
#磁盘空间警戒阈值,超过这个值则停止接受消息,默认值90
diskSpaceWarningLevelRatio=99
#强制删除文件阈值,默认85
diskSpaceCleanForciblyRatio=97

7. 启动Docker

7.1 linux环境启动

  • 在终端执行 sh startup.sh

7.2 window环境启动

  • 用PowerShell 执行 .\startup.cmd

7.3 查看日志,检查是否启动成功

在logs目录下可看到生成的日志文件,第一次启动时间会相对长一些,等看到日志文件中输出 启动耗时 。。。等字样,代表启动成功
无代码docker启动说明
此时可以访问http://宿主机IP:88 默认登录账号密码为admin

Oinone社区 作者:数式-海波原创文章,如若转载,请注明出处:https://doc.oinone.top/install/4137.html

访问Oinone官网:https://www.oinone.top获取数式Oinone低代码应用平台体验

(1)
数式-海波的头像数式-海波数式管理员
上一篇 2023年11月6日 pm2:39
下一篇 2023年11月6日

相关推荐

  • 自定义表达式函数

    由于表达式内的函数在前后端都可能执行,所以同一个表达式需要前后端同时定义 后端表达式自定义 package pro.shushi.pamirs.demo.core.fun; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import pro.shushi.pamirs.meta.annotation.Fun; import pro.shushi.pamirs.meta.annotation.Function; import pro.shushi.pamirs.meta.common.constants.NamespaceConstants; import java.util.Date; import java.util.List; import static pro.shushi.pamirs.meta.enmu.FunctionCategoryEnum.TEXT; import static pro.shushi.pamirs.meta.enmu.FunctionCategoryEnum.TIME; import static pro.shushi.pamirs.meta.enmu.FunctionLanguageEnum.JAVA; import static pro.shushi.pamirs.meta.enmu.FunctionOpenEnum.LOCAL; import static pro.shushi.pamirs.meta.enmu.FunctionSceneEnum.EXPRESSION; /** * 自定义函数 */ @Fun(NamespaceConstants.expression) public class DemoCustomFunctions { @Function.Advanced( displayName = "逗号分隔字符串数组", language = JAVA, builtin = true, category = TEXT ) @Function.fun("MY_COMMA") @Function(name = "MY_COMMA", scene = {EXPRESSION}, openLevel = LOCAL, summary = "函数示例: MY_COMMA(list)\n函数说明: 将字符串数组转为逗号分隔的字符串" ) public String myComma(List<String> list) { return StringUtils.join(list, ","); } @Function.Advanced( displayName = "根据出生算年龄", language = JAVA, builtin = true, category = TIME ) @Function.fun("CALC_AGE") @Function(name = "CALC_AGE", scene = {EXPRESSION}, openLevel = LOCAL, summary = "函数示例: CALC_AGE(birthDate)\n函数说明: 根据出生算年龄" ) public Integer calcAge(Date birthDate) { if (birthDate == null) { return 0; } return new DateTime().getYear() – new DateTime(birthDate).getYear(); } } 前端表达式定义 定义后导入到main.ts里,导入@kunlun/dependencies的代码之后 import { Expression } from '@kunlun/dependencies'; import dayjs from 'dayjs'; Expression.getInstance().registerFunction('MY_COMMA', ['array'], (list: string[]) => { return (list || []) .map((value) => { return `'${value}'`; }) .join(','); }); Expression.getInstance().registerFunction('CALC_AGE', ['string'], (birthDate: string) => { if (birthDate == null) { return 0; } return Math.ceil(dayjs().year() – dayjs(birthDate,…

    2024年7月10日
    1.8K00
  • 如何排查启动依赖错误的问题

    场景 启动的时候可能会出现以下错误提示 启动模块中包含jar包或者数据库中不存在的模块 启动模块中包含不存在的模块 启动模块互斥模块中包含已安装模块 排查项 确保启动工程的application.yml中的启动模块pamirs.boot.modules配置项内的模块在pom.xml内依赖了对应模块的jar包 确保出问题的模块的定义文件内的包扫描前缀packagePrefix方法内的路径定义正确,该路径可以是多个,但是一定要包含模块下所有子工程的路径,包括但不限于api子工程、core工程等,另外该路径也不能和其他模块的配置有重复、交集、包含关系(例如:a模块是 aa.bb.cc, b模块是aa.bb,这样b模块的路径就包含了a模块的) 启动类里spring自带的@ComponentScan.basePackages注解项需要包含所有依赖模块的路径 无代码应用创建的时候,配置了依赖模块。但这个依赖没有被本地安装,该模块就会出问题,要么删除该依赖,要么在代码里添加该依赖。

    2024年7月18日
    1.4K00
  • 【OceanBase】后端部署使用 OceanBase 数据库(海扬/OB)

    OceanBase 数据库配置 驱动配置 Maven配置(4.2.5.3版本可用) <oceanbase.version>2.4.14</oceanbase.version> <dependency> <groupId>com.oceanbase</groupId> <artifactId>oceanbase-client</artifactId> <version>${oceanbase.version}</version> </dependency> PS: oceanbase 驱动必须使用 2.4.5 版本或以上,低于此版本的驱动无法使用自增ID功能,无法正常启动。点击查看官方JDBC版本发布记录 JDBC连接配置 OceanBase – Oracle 版 pamirs: datasource: base: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.alipay.oceanbase.jdbc.Driver url: jdbc:oceanbase://10.xxx.xxx.xxx:1001/BASE?useServerPrepStmts=true&useOraclePrepareExecute=true&defaultFetchSize=4096 username: xxxxxx password: xxxxxx validConnectionCheckerClassName: com.alibaba.druid.pool.vendor.OracleValidConnectionChecker validationQuery: SELECT 1 FROM DUAL OceanBase – MySQL 版 pamirs: datasource: base: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.alipay.oceanbase.jdbc.Driver url: jdbc:oceanbase://10.xxx.xxx.xxx:1001/base username: xxxxxx password: xxxxxx 连接 URL 配置 点击查看官方JDBC连接配置说明 URL 格式(OceanBase – Oracle 版) jdbc:oceanbase://${host}:${port}/${database}?useServerPrepStmts=true&useOraclePrepareExecute=true&defaultFetchSize=4096 在jdbc连接配置时,useServerPrepStmts=true&useOraclePrepareExecute=true 必须配置,否则自增主键无法正常使用。 defaultFetchSize=4096 意味着在使用服务端预处理时,游标每次获取的结果集行数,驱动默认值为 10,在进行大量数据获取时会出现卡顿的现象,因此推荐使用 4096 作为其结果集大小。过大可能会导致 OOM,过小可能还是会出现卡顿,该值需要按实际情况进行配置。 其他连接参数如需配置,可自行查阅相关资料进行调优。 方言配置(OceanBase – Oracle 版) PS:OceanBase – MySQL 版无需配置方言,只需修改数据库连接即可正常使用。 pamirs方言配置 pamirs: dialect: ds: base: type: OceanBase version: 4.2.5.3 major-version: oracle-4.2 pamirs: type: OceanBase version: 4.2.5.3 major-version: oracle-4.2 plus: configuration: jdbc-type-for-null: "NULL" using-model-as-property: true using-statement-handler-dialect: true mapper: batch: collectionCommit default-batch-config: read: 500 write: 100 数据库版本 type version majorVersion 4.2.5.3 OceanBase 4.2.5.3 oracle-4.2 PS:由于方言开发环境为4.2.5.3版本,其他类似版本(4.x)原则上不会出现太大差异,如出现其他版本无法正常支持的,可在文档下方留言。 schedule方言配置 pamirs: event: enabled: true schedule: enabled: true dialect: type: Oracle version: 12.2 major-version: 12c type version majorVersion Oracle 12.2 12c PS:由于 schedule 的方言与 Oracle 数据库并无明显差异,OceanBase 数据库可以直接使用 Oracle 数据库方言。 其他配置(OceanBase – Oracle 版) 逻辑删除的值配置 pamirs: mapper: global: table-info: logic-delete-value: (CAST(SYSTIMESTAMP AS DATE) – TO_DATE('1970-01-01 08:00:00', 'YYYY-MM-DD HH24:MI:SS')) * 8640000000000

    2025年7月21日
    65500
  • 如何替换页面中的静态资源为私有存储

    介绍 为了让我们可以快速体验到oinone的产品,oinone的工程内默认提供了一个阿里云oss的存储空间来存放一些静态资源,如网站在浏览器标签栏的图标、登录页的logo、站内页面的logo、默认头像、背景图等,但是在实际业务中我们需要把其中部分静态资源更换为自有品牌或者客户品牌定制的静态资源。 解决方案 oinone提供了一套可以替换掉默认静态资源的方案 获取静态资源文件的压缩包static.zip 解压到到运维指定的目录下,这里以/project/static为例,前端通过浏览器开发工具查看到需要替换的图片路径,在static目录下找到对应路径的文件,替换为自有文件 配置nginx的文件系统(使用阿里云oss、minio等云存储方案的可以忽略该步骤) server { listen 8899; location /static { alias /project/static; add_header Content-Disposition attachment; add_header Content-Type application/octet-stream; } } 前端启动工程中的.env文件中增加如下配置(ss-boot) STATIC_IMG=http://访问地址/static/images 生产模式重新打包 或 开发模式重新运行就可以看到效果

    2024年3月20日
    1.5K00
  • 如何解决界面设计器保存提示:元数据不存在或已删除

    现象 界面设计器设计页面的时候,从左侧边栏模型下拖入了一个字段到页面,保存的时候提示:元数据不存在或已删除 原因 共base库不共元数据缓存redis导致的,不共redis的情况下,每次本地新增或修改元数据(如:字段、方法)启动后会同步本地redis,再去线上启动的时候,由于元数据已经在本地写入到了base库,所以该次启动不会触发redis差量更新 解决方案 通过将boot工程application.yml以下配置,让redis全量刷新元数据缓存 pamirs: distribution: session: allMetaRefresh: true 扩展 这个方法只能解决新增或修改元数据,如果出现了删除元数据的话,改为true也不行,清空或者手动删除问题redis的key都可以

    2024年7月21日
    1.1K00

Leave a Reply

登录后才能评论