无代码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日

相关推荐

  • Docker部署常见问题

    问题1:容器启动出现library initialization failed – unable to allocate file descriptor table – out of memory异常如何处理? 原因 不同操作系统安装Docker后,容器运行环境并不一致,需要对Docker运行参数进行调整。 解决方案 编辑/etc/systemd/system/docker.service文件, 有些系统该文件位置:/lib/systemd/system/docker.service 查看docker的systemd(docker.service)配置位置 systemctl status docker 查看docker的systemd配置位置 将下列参数进行修改 LimitNOFILE=65535 LimitNPROC=65535 LimitCORE=65535 执行以下脚本 systemctl daemon-reload systemctl restart docker 问题2:容器启动出现library initialization failed – unable to allocate file descriptor table – out of memorypanic: signal: aborted (core dumped)异常如何处理? 问题现象 1、 按照【问题1】的设置进行配置后,仍然不生效; 2、 尝试修改宿主机系统内核的ulimits,重启docker仍报错。修改docker.service(文件位置:/etc/systemd/system/docker.service文件, 有些系统该文件位置:/lib/systemd/system/docker.service) 解决方案 查看docker的systemd(docker.service)配置位置【问题1】中的办法 在ExecStart命令后加上创建容器的默认ulimit配置,如下,设置容器启动时的ulimit为65535:65535 –default-ulimit nofile=65535:65535 配置好后: ExecStart=/usr/bin/dockerd -H fd:// –containerd=/run/containerd/containerd.sock –default-ulimit nofile=65535:65535 执行以下脚本 systemctl daemon-reload systemctl restart docker 资料参考:https://blog.csdn.net/weixin_42241322/article/details/137122868 问题3:拉取设计器镜像报错 报错信息,拉取镜像harbor.oinone.top连不上。 docker login –username=schhsw_oinone harbor.oinone.top i Info → A Personal Access Token (PAT) can be used instead. To create a PAT, visit https://app.docker.com/settings Password: time="2025-02-27T11:24:58+08:00" level=info msg="Error logging in to endpoint, trying next endpoint" error="Get \"https://harbor.oinone.top/v2/\": dial tcp 0.0.0.0:443: connect: connection refused" Get "https://harbor.oinone.top/v2/": dial tcp 0.0.0.0:443: connect: connection refused kfpt@kfpt-virtual-machine:~$ sudo -i root@kfpt-virtual-machine:~# docker login –username=schhsw_oinone harbor.oinone.top i Info → A Personal Access Token (PAT) can be used instead. To create a PAT, visit https://app.docker.com/settings Password: Error response from daemon: Get "https://harbor.oinone.top/v2/": dial tcp 0.0.0.0:443: connect: connection refused 排查过程: 排除到后面发现原因是DNS配置的问题,换了一个阿里云的IP就可以了

    2025年3月13日
    91600
  • 如何添加数据可视化运行时依赖

    前端 package.json中新增依赖 @kunlun/data-designer-open-pc,版本跟@kunlun/dependencies的填一样 src/main.ts内导入依赖 import 'reflect-metadata'; import { VueOioProvider } from '@kunlun/dependencies'; // START 导入代码放在导入@kunlun/dependencies之后 import '@kunlun/data-designer-open-pc'; // END 导入代码放在VueOioProvider()方法执行前 VueOioProvider({ // TODO }); 后端 父pom新增依赖 <properties> <pamirs.data.visualization.version>4.7.8</pamirs.data.visualization.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>pro.shushi.pamirs.data.visualization</groupId> <artifactId>pamirs-data-visualization</artifactId> <version>${pamirs.data.visualization.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> 2.boot启动工程的pom新增依赖 <dependency> <groupId>pro.shushi.pamirs.data.visualization</groupId> <artifactId>pamirs-data-visualization-core</artifactId> </dependency> 3.application.yml配置新增依赖 pamirs: boot: modules: – datavi 注意:datavi 这个模块在业务工程和设计器指定数据源要保持一致。

    2024年5月15日
    91300
  • 分部式缓存配置优化

    介绍 分布式缓存是为了解决以下2个场景 开发时,设计器和开发者本地业务工程同步元数据用的 多模块分部式部署架构 单机版的生产环境是不需要这个特性的,所以默认的启动配置不建议加分布式缓存的依赖包,只在开发环境开启即可 boot启动工程的pom.xml文件配置示例 <project> <profiles> <profile> <!– 下面配置的值根据 spring.profiles.active 识别 –> <id>dev</id> <!– 开发环境增加分布式依赖,支持设计器可以正确访问业务工程 –> <dependencies> <dependency> <groupId>pro.shushi.pamirs.distribution</groupId> <artifactId>pamirs-distribution-faas</artifactId> </dependency> <dependency> <groupId>pro.shushi.pamirs.distribution</groupId> <artifactId>pamirs-distribution-session</artifactId> </dependency> <dependency> <groupId>pro.shushi.pamirs.distribution</groupId> <artifactId>pamirs-distribution-gateway</artifactId> </dependency> </dependencies> </profile> </profiles> </project>

    2024年7月10日
    1.1K00
  • 【PostgreSQL】后端部署使用PostgreSQL数据库

    PostgreSQL数据库配置 驱动配置 Maven配置(14.3版本可用) <postgresql.version>42.6.0</postgresql.version> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>${postgresql.version}</version> </dependency> 离线驱动下载 postgresql-42.2.18.jarpostgresql-42.6.0.jarpostgresql-42.7.3.jar JDBC连接配置 pamirs: datasource: base: type: com.alibaba.druid.pool.DruidDataSource driverClassName: org.postgresql.Driver url: jdbc:postgresql://127.0.0.1:5432/pamirs?currentSchema=base username: xxxxxx password: xxxxxx 连接url配置 暂无官方资料 url格式 jdbc:postgresql://${host}:${port}/${database}?currentSchema=${schema} 在jdbc连接配置时,${database}和${schema}必须完整配置,不可缺省。 其他连接参数如需配置,可自行查阅相关资料进行调优。 方言配置 pamirs方言配置 pamirs: dialect: ds: base: type: PostgreSQL version: 14 major-version: 14.3 pamirs: type: PostgreSQL version: 14 major-version: 14.3 数据库版本 type version majorVersion 14.x PostgreSQL 14 14.3 PS:由于方言开发环境为14.3版本,其他类似版本(14.x)原则上不会出现太大差异,如出现其他版本无法正常支持的,可在文档下方留言。 schedule方言配置 pamirs: event: enabled: true schedule: enabled: true dialect: type: PostgreSQL version: 14 major-version: 14.3 type version majorVersion PostgreSQL 14 14.3 PS:由于schedule的方言在多个版本中并无明显差异,目前仅提供一种方言配置。 其他配置 逻辑删除的值配置 pamirs: mapper: global: table-info: logic-delete-value: (EXTRACT(epoch FROM CURRENT_TIMESTAMP) * 1000000 + EXTRACT(MICROSECONDS FROM CURRENT_TIMESTAMP))::bigint PostgreSQL数据库用户初始化及授权 — init root user (user name can be modified by oneself) CREATE USER root WITH PASSWORD 'password'; — if using automatic database and schema creation, this is very important. ALTER USER root CREATEDB; SELECT * FROM pg_roles; — if using postgres database, this authorization is required. GRANT CREATE ON DATABASE postgres TO root;

    2023年11月1日
    94000
  • 自定义表达式函数

    由于表达式内的函数在前后端都可能执行,所以同一个表达式需要前后端同时定义 后端表达式自定义 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.7K00

Leave a Reply

登录后才能评论