当前位置:网站首页>低代码开发平台NocoBase的安装
低代码开发平台NocoBase的安装
2022-06-27 03:46:00 【杨浦老苏】

明天有事外出,博客和 csdn 提前发,公众号还是明天定时发;
本文是应
CSDN网友bob89you的要求而写
什么是 NocoBase ?
NocoBase是一个极易扩展的开源无代码开发平台。 无需编程,使用NocoBase搭建自己的协作平台、管理系统,只需要几分钟时间。
NocoBase 是国人开发的,比较值得称赞的是, NocoBase 的文档和教程相对比较完善,这在开源项目中比较罕见,所以入门相对比较容易。但是也需要注意,NocoBase 正处在早期开发阶段,可能变动频繁,请谨慎用于生产环境。
NocoBase 支持三种安装方式,在群晖上我们默认还是采用 docker 方式安装,不过在安装过程中老苏还是遇到了坑,接下来请听我慢慢道来。
重要说明
- 本文撰写时基于的安装版本为
0.7.0-alpha.78,所以结论只针对该版本; - 几个小时前发布的最新版本为
0.7.1-alpha.7,这个版本在发稿前做了简单的测试,发现所有的版本均失败,日志均只有两行内容,不建议安装最新版本;

数据库的选择
NocoBase 支持三种数据库,分别是 PostgreSQL 、 MySQL 和 SQLite ,老苏觉得既然是在群晖上,完全可以用群晖自带的 MariaDB 10 数据库。
以前都是这么干的,而且一直挺顺利的,但是没想到这次,不管是使用群晖自带的 MariaDB 10 数据库还是另外用 Docker 安装 MySQL 都遇到了问题。
MariaDB(失败)
这部分只是记录折腾的过程,但并没有成功,所以你完全可以跳过这个章节
官方并没有指定版本,老苏试了群晖自带的 MariaDB 5,从日志看,明确不支持。官方示例的 docker-compose.yml 中用的 MySQL 8 ,所以老苏用了群晖自带的 MariaDB 10 数据库。

- 第一步、在
phpMyAdmin中创建名为nocobase的空数据库。
为了演示方便,后面假设数据库密码都是:
nocobase

- 第二步、将下面的内容保存为
docker-compose.yml文件
version: "3"
services:
app:
image: nocobase/nocobase:0.7.0-alpha.78
container_name: nocobase
environment:
- DB_DIALECT=mysql
- DB_HOST=192.168.0.197
- DB_PORT=3307
- DB_DATABASE=nocobase
- DB_USER=nocobase
- DB_PASSWORD=nocobase
- LOCAL_STORAGE_BASE_URL=http://192.168.0.197:13000/storage/uploads
volumes:
- ./storage:/app/nocobase/storage
ports:
- "13000:80"
- 第三步、执行下面的命令,在
portainer中执行也是可以的
后面虽然数据库不同,但是执行命令是一样的,不同的只是
docker-compose.yml文件
# 新建文件夹 nocobase 和 子目录
mkdir -p /volume2/docker/nocobase/{
mdata,pdata,storage}
# 进入 nocobase 目录
cd /volume2/docker/nocobase
# 将 docker-compose.yml 放入当前目录
# 一键启动
docker-compose up -d
- 第四步、在浏览器中输入
http://群晖IP:13000,页面空白,右上侧闪过红叉

从日志看有报错

但是检查数据库,已经生成了表

MySQL(失败)
这部分只是记录折腾的过程,但并没有成功,所以你完全可以跳过这个章节
version: "3"
services:
app:
image: nocobase/nocobase:0.7.0-alpha.78
networks:
- nocobase
depends_on:
- mysql
environment:
- DB_DIALECT=mysql
- DB_HOST=mysql
- DB_PORT=3306
- DB_DATABASE=nocobase
- DB_USER=nocobase
- DB_PASSWORD=nocobase
- LOCAL_STORAGE_BASE_URL=http://192.168.0.197:13000/storage/uploads
volumes:
- ./storage:/app/nocobase/storage
ports:
- "13000:80"
mysql:
image: mysql:8
volumes:
- ./mdata:/var/lib/mysql
environment:
- MYSQL_DATABASE=nocobase
- MYSQL_USER=nocobase
- MYSQL_PASSWORD=nocobase
- MYSQL_ROOT_PASSWORD=nocobase
restart: always
command: --character-set-server=utf8 --collation-server=utf8_unicode_ci
networks:
- nocobase
networks:
nocobase:
driver: bridge
这个表现症状虽然和 MariaDB 一样,但实际上从日志看是没有连上数据库,这个就比较奇怪了,感觉似乎是 Sequelize.js 这个 ORM 库设置上存在问题,但老苏不是程序员,没法验证。
SQLite(成功)
折腾 MariaDB 和 MySQL 花了很长时间,但是老苏并不甘心就这样放弃,所以又折腾了 SQLite
version: "3"
services:
app:
image: nocobase/nocobase:0.7.0-alpha.78
container_name: nocobase
networks:
- nocobase
environment:
- LOCAL_STORAGE_BASE_URL=http://192.168.0.197:13000/storage/uploads
volumes:
- ./storage:/app/nocobase/storage
ports:
- "13000:80"
networks:
nocobase:
driver: bridge
日志中一切正常,很顺利的出现了登录界面

PostgreSQL(成功)
受到 SQLite 成功的鼓舞,老苏又测试了 PostgreSQL,也成功的出现了登录界面
version: "3"
services:
app:
image: nocobase/nocobase:0.7.0-alpha.78
networks:
- nocobase
environment:
- DB_DIALECT=postgres
- DB_HOST=postgres
- DB_DATABASE=nocobase
- DB_USER=nocobase
- DB_PASSWORD=nocobase
- LOCAL_STORAGE_BASE_URL=http://192.168.0.197:13000/storage/uploads
volumes:
- ./storage:/app/nocobase/storage
ports:
- "13000:80"
depends_on:
- postgres
postgres:
image: postgres:14
restart: always
networks:
- nocobase
command: postgres -c wal_level=logical
volumes:
- ./pdata:/var/lib/postgresql/data
environment:
POSTGRES_USER: nocobase
POSTGRES_DB: nocobase
POSTGRES_PASSWORD: nocobase
networks:
nocobase:
driver: bridge
小结
老苏测试的时候,nocobase 的 latest 版本对应的是 0.7.0-alpha.78,目前看来,要想跑起来,数据库暂时不能选择 MySQL 和 MariaDB,至于是用 PostgreSQL 还是 SQLite ,看你的应用场景了,只是随便用用,SQLite 就足够了
运行
在浏览器中输入 http://群晖IP:13000 就能看到登录界面
初始化账号和密码是
[email protected]和admin123。

登录成功后的主界面还是空空

设置中文
安装完成之后,看官方文档发现可以用环境变量
INIT_APP_LANG设置语言,默认是en-US,可选项还有zh-CN
点右上角的管理员,弹出的菜单中选择简体中文即可

关于使用,官方有详细的教程,例如: 5分钟上手(https://docs-cn.nocobase.com/user-manual/introduction/5-minutes-to-get-started),图文并茂还有动图,而且还是中文的,所以功能就留给大家自己研究吧。
参考文档
nocobase/nocobase: NocoBase is a scalability-first, open-source no-code/low-code platform to build internal tools.
地址:https://github.com/nocobase/nocobase
介绍 - NocoBase
地址:https://docs-cn.nocobase.com/
Docker 安装 ( 推荐) - NocoBase
地址:https://docs-cn.nocobase.com/getting-started/installation/docker-compose
边栏推荐
- I found a JSON visualization tool artifact. I love it!
- Kotlin Compose 自定义 CompositionLocalProvider CompositionLocal
- Semantic version 2.0.0
- 如何让 EF Core 6 支持 DateOnly 类型
- Geometric distribution (a discrete distribution)
- TP5 Spreadsheet Excle 表格导出
- 我是怎样简化开源系统中的接口的开发的?
- How can e-commerce products be promoted and advertised on Zhihu?
- Method of decoding iPhone certificate file
- A^2=E | 方程的解 | 这个方程究竟能告诉我们什么
猜你喜欢

2021:passage retrieval for outside knowledgevisual question answering

resnet152 辣椒病虫害图像识别1.0
![Promise [II. Promise source code] [detailed code comments / complete test cases]](/img/ac/abf3181fa7b3345efcc9abc046cea5.png)
Promise [II. Promise source code] [detailed code comments / complete test cases]

Uni-app 之uParse 富文本解析 完美解析富文本!

Network structure and model principle of convolutional neural network (CNN)

2021:Passage Retrieval for Outside-KnowledgeVisual Question Answering通道检索的外部知识视觉问答

How can e-commerce products be promoted and advertised on Zhihu?

流沙画模拟器源码

Uni app's uparse rich text parsing perfectly parses rich text!

Cvpr2021:separating skills and concepts for new visual question answering
随机推荐
[promise I] introduction of promise and key issues of hand rolling
Pat grade a 1019 general palindromic number
Qingscan use
栈溢出漏洞
2021:Check it again:Progressive Visual Question Answering via Visual Entailment通过视觉暗示进行渐进式视觉问答
List of best reading materials for machine learning in communication
Pat class a 1024 palindromic number
MySql的开发环境
Basic functions of promise [IV. promise source code]
实践 DevOps 时,可能面临的六大挑战
Super detailed, 20000 word detailed explanation, thoroughly understand es!
TopoLVM: 基于LVM的Kubernetes本地持久化方案,容量感知,动态创建PV,轻松使用本地磁盘
2021:Graphhopper: Multi-Hop Scene Graph Reasoning for Visual Question Answering
JMeter takes the result of the previous request as the parameter of the next request
2022年氯碱电解工艺试题及答案
IDEA中好用的插件
How does source insight (SI) display the full path? (do not display omitted paths) (turn off trim long path names with ellipses)
2021:AdaVQA: Overcoming Language Priors with Adapted Margin Cosine Loss∗自适应的边缘余弦损失解决语言先验
Static timing analysis OCV and time derive
Products change the world