Files

61 lines
1.6 KiB
Markdown
Raw Normal View History

2022-02-08 11:05:47 +08:00
简体中文
2021-09-28 11:47:19 +08:00
2022-02-08 11:05:47 +08:00
<h1 align="center">Sciences Server</h1>
<div align="center">
中科云管理系统
</div>
2022-01-11 10:41:46 +08:00
2022-02-08 11:05:47 +08:00
环境和依赖
----
2022-02-08 18:26:40 +08:00
- Go >= 1.15
2022-02-08 11:05:47 +08:00
- [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)
2022-02-08 18:26:40 +08:00
- [Elasticsearch](https://github.com/olivere/elastic) - ESSearchV7
2022-02-08 11:05:47 +08:00
项目编译和运行
----
- 编译项目
```bash
2022-03-08 14:33:32 +08:00
go build [-x|-o]
2022-02-08 11:05:47 +08:00
```
- 运行项目
```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
2022-02-08 16:11:59 +08:00
linux
一:./server.sh请注意修改文件提示的地方
nohup ./项目 &
DockerFile
2022-02-08 11:05:47 +08:00
```
2022-02-08 16:11:59 +08:00
> 请注意,注意修改`server.sh`、`DockerFile`配置信息
2022-02-08 11:05:47 +08:00
- 其他说明
- 项目目录
2022-02-08 16:11:59 +08:00
- cmd 项目执行入口
- file 配置文件,不可删除
- key 密钥管理,不可删除
- log 日志管理,自动生成