feihua / zero-admin

Zero-Admin 是一套基于 go-zero 框架实现的电商系统的后端服务
https://feihua.github.io
Apache License 2.0
694 stars 175 forks source link

怎么运行这个程序呢? #3

Open forging2012 opened 3 years ago

forging2012 commented 3 years ago

希望能完善下文档,看着有点摸不清头脑。

feihua commented 3 years ago

项目是基于go-zero开发的,可以先看下go-zero的官网文档https://go-zero.dev/cn 本项目的文档迟一点回补上

thunur commented 3 years ago

导表,根据shell.sh构建docker镜像,逐个启动docker镜像就可以了。

wjlzr commented 2 years ago

@Thunural 不行吧?是不是缺点什么 端口没放开吗 我这边起了8888访问不同

wjlzr commented 2 years ago

大佬出个文档呗 是不是还用了nginx

hwangjr commented 2 years ago

请教下如何导表。目前数据库没有 sql 文件无法初始化。

feihua commented 2 years ago

sql文件在rpc/doc文件夹下

feihua commented 2 years ago

大佬出个文档呗 是不是还用了nginx

本地启动不用。部署的时候可以用nginx

hwangjr commented 2 years ago

sql文件在rpc/doc文件夹下

OK,感谢。

hwangjr commented 2 years ago

顺便同步下,可以多个sql文件合并下执行:cat *.sql > all.sql

hwangjr commented 2 years ago

@feihua 搭建起来,但是权限的表数据是不是不全?比如 系统管理 -> 角色管理 -> 分配权限,会提示:

用户userId: 1,没有访问: /api/sys/role/updateRoleMenu,路径的的权限,请联系管理员

看了下中间件,是基于 redis 的 url 看是否有权限访问。这个是漏掉哪个步骤了吗?

但是在线的 demo 又可以。

feihua commented 2 years ago

@feihua 搭建起来,但是权限的表数据是不是不全?比如 系统管理 -> 角色管理 -> 分配权限,会提示:


用户userId: 1,没有访问: /api/sys/role/updateRoleMenu,路径的的权限,请联系管理员

看了下中间件,是基于 redis 的 url 看是否有权限访问。这个是漏掉哪个步骤了吗?

但是在线的 demo 又可以。

在表里面配置一下就可以了。可能导出来的数据不全

hwangjr commented 2 years ago

配置的话,也没有权限添加,就有点尴尬。能否更新下权限的 sql,而且看起来还蛮多的。

feihua commented 2 years ago

配置的话,也没有权限添加,就有点尴尬。能否更新下权限的 sql,而且看起来还蛮多的。

晚上 我整理一下

hwangjr commented 2 years ago

求更新,在线等。感谢大佬。

feihua commented 2 years ago

求更新,在线等。感谢大佬。

已更新了

sumdys commented 1 year ago

没有文档说明怎么跑起来?

lchjczw commented 1 year ago

mac m1上已经编译通过,不过跑不起来,链接etcd出错,有人遇到类似的问题吗

{"level":"warn","ts":"2023-04-17T10:21:07.911319+0800","logger":"etcd-client","caller":"v3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0x40005d4a80/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"error reading server preface: EOF\""}

lchjczw commented 1 year ago

我的问题是因为mac上的docker无法连接主机,etcd这些也只能使用docker运行,建立网络连接

thunur commented 1 year ago

我的问题是因为mac上的docker无法连接主机,etcd这些也只能使用docker运行,建立网络连接

可以不需要etcd的,直接采用直连的方式也可以

SheepYang1993 commented 7 months ago

项目要怎么在本地机子(Windows10 或者 Mac m1)上运行起来呀? 还有要怎么部署到Linux服务器? 有没有文档或者步骤?

feihua commented 3 months ago

项目要怎么在本地机子(Windows10 或者 Mac m1)上运行起来呀? 还有要怎么部署到Linux服务器? 有没有文档或者步骤?

项目根路径的build.bat脚本提供window一键编译脚本,编译后修改配置文件里面的redis, mysql即可启动(提前设置好交叉编译)