Files
henry cf757ce734 up
2022-03-08 14:33:32 +08:00

61 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

简体中文
<h1 align="center">Sciences Server</h1>
<div align="center">
中科云管理系统
</div>
环境和依赖
----
- Go >= 1.15
- [Gin](https://github.com/gin-gonic/gin) - Web Router
- [Gorm.v2](https://github.com/go-gorm/gorm) - Data Engine
- [Cacbin](https://github.com/casbin/casbin) - Auth(RBAC)
- [Redis](https://github.com/redis/redis)
- [Elasticsearch](https://github.com/olivere/elastic) - ESSearchV7
项目编译和运行
----
- 编译项目
```bash
go build [-x|-o]
```
- 运行项目
```bash
./项目文件 start -m ['debug'|'release'] -s ['./default_setting.yaml'] -a ['./default_engine.yaml']
```
> 请注意:
>
> 复制[.default_setting.yaml](./.default_setting.yaml)文件,去除前面的`.`,参考基本配置信息
>
> 在运行项目开始,请先执行初始化命令 `init` (./项目文件 init -H 地址 -P 端口 -d 数据库 -u 用户名 -p 密码 )
>
> 参考案例:./SciencesServer init -H 192.168.0.188 -P 3306 -d sciences -u appuser -p ABCabc01
>
> 支持mysqlsqlite建议使用mysql作为数据引擎详细请参考 [default_engine.yaml](./default_engine.yaml) ,初始化会生成此文件
- 打包项目
```bash
pack
```
> 请注意需要node.js支持安装 `pack` (npm install -g @penggy/pack)命令
- 发布项目
```bash
linux
一:./server.sh请注意修改文件提示的地方
nohup ./项目 &
DockerFile
```
> 请注意,注意修改`server.sh`、`DockerFile`配置信息
- 其他说明
- 项目目录
- cmd 项目执行入口
- file 配置文件,不可删除
- key 密钥管理,不可删除
- log 日志管理,自动生成