827
This commit is contained in:
52
bbs-go/.github/workflows/bbs-go-server.yml
vendored
52
bbs-go/.github/workflows/bbs-go-server.yml
vendored
@@ -1,26 +1,26 @@
|
||||
name: bbs-go-server
|
||||
|
||||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.21
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./server
|
||||
run: |
|
||||
go mod download
|
||||
|
||||
- name: Build
|
||||
working-directory: ./server
|
||||
run: |
|
||||
make build
|
||||
name: bbs-go-server
|
||||
|
||||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.21
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./server
|
||||
run: |
|
||||
go mod download
|
||||
|
||||
- name: Build
|
||||
working-directory: ./server
|
||||
run: |
|
||||
make build
|
||||
|
||||
62
bbs-go/.github/workflows/bbs-go-site.yml
vendored
62
bbs-go/.github/workflows/bbs-go-site.yml
vendored
@@ -1,32 +1,32 @@
|
||||
name: bbs-go-site
|
||||
|
||||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [ 20.x ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v3
|
||||
with:
|
||||
version: 8
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: site/pnpm-lock.yaml
|
||||
- name: Install dependencies
|
||||
working-directory: ./site
|
||||
run: |
|
||||
pnpm install
|
||||
- name: Build
|
||||
working-directory: ./site
|
||||
run: |
|
||||
name: bbs-go-site
|
||||
|
||||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [ 20.x ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v3
|
||||
with:
|
||||
version: 8
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: site/pnpm-lock.yaml
|
||||
- name: Install dependencies
|
||||
working-directory: ./site
|
||||
run: |
|
||||
pnpm install
|
||||
- name: Build
|
||||
working-directory: ./site
|
||||
run: |
|
||||
pnpm build
|
||||
12
bbs-go/.gitignore
vendored
12
bbs-go/.gitignore
vendored
@@ -1,7 +1,7 @@
|
||||
.idea
|
||||
dist
|
||||
*.log
|
||||
.DS_Store
|
||||
node_modules
|
||||
.nuxt
|
||||
.idea
|
||||
dist
|
||||
*.log
|
||||
.DS_Store
|
||||
node_modules
|
||||
.nuxt
|
||||
.docker-compose/mysql/data
|
||||
1348
bbs-go/LICENSE
1348
bbs-go/LICENSE
File diff suppressed because it is too large
Load Diff
170
bbs-go/README.md
170
bbs-go/README.md
@@ -1,85 +1,85 @@
|
||||
## 项目地址
|
||||
|
||||
- 演示站:[https://bbs.bbs-go.com](https://bbs.bbs-go.com)
|
||||
- 文档地址:[https://bbs-go.com](https://bbs-go.com)
|
||||
- 问题反馈: [https://mlog.club/topics/node/3](https://mlog.club/topics/node/3)
|
||||
- Github: [https://github.com/mlogclub/bbs-go](https://github.com/mlogclub/bbs-go)
|
||||
- Gitee: [https://gitee.com/mlogclub/bbs-go](https://gitee.com/mlogclub/bbs-go)
|
||||
|
||||
## 联系我
|
||||
|
||||
### 用户交流群
|
||||
|
||||

|
||||
|
||||
### 加我微信
|
||||
|
||||

|
||||
|
||||
## 介绍
|
||||
|
||||
`bbs-go` 是一个基于 Go 语言开发的开源社区论坛系统。它的设计旨在提供轻量、高效的社区讨论平台,支持现代化的 Web 技术栈,并且易于扩展和部署。bbs-go 项目采用模块化架构,能够与其他服务和前端框架无缝集成,适合各种规模的在线社区。
|
||||
|
||||
项目的主要特点包括:
|
||||
|
||||
- **高性能**:基于 Go 语言的并发特性,能够在高负载下保持良好的性能表现。
|
||||
- **灵活性**:支持自定义配置、插件扩展,易于适应不同需求。
|
||||
- **简单易用**:提供简洁的管理后台,方便社区管理员管理论坛内容和用户。
|
||||
- **支持 MySQL 数据库**:提供对常见数据库的支持,确保数据存储的可靠性和稳定性。
|
||||
- **响应式设计**:前端使用现代化的技术,能够在移动设备和桌面设备上提供良好的用户体验。
|
||||
|
||||
项目主要面向开发者和社区管理者,适合搭建技术讨论、兴趣分享等类型的社区论坛。
|
||||
|
||||

|
||||
|
||||
## 模块
|
||||
|
||||
### server
|
||||
|
||||
[](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-server.yml)
|
||||
|
||||
> 基于`Golang`搭建,提供接口数据支撑。
|
||||
|
||||
技术栈
|
||||
|
||||
- iris ([https://github.com/kataras/iris](https://github.com/kataras/iris)) Go语言 mvc 框架
|
||||
- gorm ([http://gorm.io](http://gorm.io)) 最好用的Go语言数据库orm框架
|
||||
- resty ([https://github.com/go-resty/resty](https://github.com/go-resty/resty)) Go语言好用的 http-client
|
||||
- cron ([https://github.com/robfig/cron](https://github.com/robfig/cron)) 定时任务框架
|
||||
- goquery ([https://github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery)) html dom 元素解析
|
||||
|
||||
### site
|
||||
|
||||
[](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-site.yml)
|
||||
|
||||
> 前端页面渲染服务,基于`nuxt.js`搭建。
|
||||
|
||||
技术栈
|
||||
|
||||
- vue.js ([https://vuejs.org](https://vuejs.org)) 渐进式 JavaScript 框架
|
||||
- nuxt.js ([https://nuxtjs.org](https://nuxtjs.org)) 基于Vue的服务端渲染框架,效率高到爆
|
||||
|
||||
### admin
|
||||
|
||||
[](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-admin.yml)
|
||||
|
||||
> 管理后台系统,基于`vue.js + element-ui`搭建。
|
||||
|
||||
技术栈
|
||||
|
||||
- vue.js ([https://vuejs.org](https://vuejs.org)) 渐进式 JavaScript 框架
|
||||
- element-ui ([https://element.eleme.cn](https://element.eleme.cn)) 饿了么开源的基于 vue.js 的前端库
|
||||
|
||||
## 功能预览
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Contributors
|
||||
|
||||
<a href="https://github.com/mlogclub/bbs-go/graphs/contributors"><img src="https://opencollective.com/bbs-go/contributors.svg?width=890&button=false" /></a>
|
||||
## 项目地址
|
||||
|
||||
- 演示站:[https://bbs.bbs-go.com](https://bbs.bbs-go.com)
|
||||
- 文档地址:[https://bbs-go.com](https://bbs-go.com)
|
||||
- 问题反馈: [https://mlog.club/topics/node/3](https://mlog.club/topics/node/3)
|
||||
- Github: [https://github.com/mlogclub/bbs-go](https://github.com/mlogclub/bbs-go)
|
||||
- Gitee: [https://gitee.com/mlogclub/bbs-go](https://gitee.com/mlogclub/bbs-go)
|
||||
|
||||
## 联系我
|
||||
|
||||
### 用户交流群
|
||||
|
||||

|
||||
|
||||
### 加我微信
|
||||
|
||||

|
||||
|
||||
## 介绍
|
||||
|
||||
`bbs-go` 是一个基于 Go 语言开发的开源社区论坛系统。它的设计旨在提供轻量、高效的社区讨论平台,支持现代化的 Web 技术栈,并且易于扩展和部署。bbs-go 项目采用模块化架构,能够与其他服务和前端框架无缝集成,适合各种规模的在线社区。
|
||||
|
||||
项目的主要特点包括:
|
||||
|
||||
- **高性能**:基于 Go 语言的并发特性,能够在高负载下保持良好的性能表现。
|
||||
- **灵活性**:支持自定义配置、插件扩展,易于适应不同需求。
|
||||
- **简单易用**:提供简洁的管理后台,方便社区管理员管理论坛内容和用户。
|
||||
- **支持 MySQL 数据库**:提供对常见数据库的支持,确保数据存储的可靠性和稳定性。
|
||||
- **响应式设计**:前端使用现代化的技术,能够在移动设备和桌面设备上提供良好的用户体验。
|
||||
|
||||
项目主要面向开发者和社区管理者,适合搭建技术讨论、兴趣分享等类型的社区论坛。
|
||||
|
||||

|
||||
|
||||
## 模块
|
||||
|
||||
### server
|
||||
|
||||
[](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-server.yml)
|
||||
|
||||
> 基于`Golang`搭建,提供接口数据支撑。
|
||||
|
||||
技术栈
|
||||
|
||||
- iris ([https://github.com/kataras/iris](https://github.com/kataras/iris)) Go语言 mvc 框架
|
||||
- gorm ([http://gorm.io](http://gorm.io)) 最好用的Go语言数据库orm框架
|
||||
- resty ([https://github.com/go-resty/resty](https://github.com/go-resty/resty)) Go语言好用的 http-client
|
||||
- cron ([https://github.com/robfig/cron](https://github.com/robfig/cron)) 定时任务框架
|
||||
- goquery ([https://github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery)) html dom 元素解析
|
||||
|
||||
### site
|
||||
|
||||
[](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-site.yml)
|
||||
|
||||
> 前端页面渲染服务,基于`nuxt.js`搭建。
|
||||
|
||||
技术栈
|
||||
|
||||
- vue.js ([https://vuejs.org](https://vuejs.org)) 渐进式 JavaScript 框架
|
||||
- nuxt.js ([https://nuxtjs.org](https://nuxtjs.org)) 基于Vue的服务端渲染框架,效率高到爆
|
||||
|
||||
### admin
|
||||
|
||||
[](https://github.com/mlogclub/bbs-go/actions/workflows/bbs-go-admin.yml)
|
||||
|
||||
> 管理后台系统,基于`vue.js + element-ui`搭建。
|
||||
|
||||
技术栈
|
||||
|
||||
- vue.js ([https://vuejs.org](https://vuejs.org)) 渐进式 JavaScript 框架
|
||||
- element-ui ([https://element.eleme.cn](https://element.eleme.cn)) 饿了么开源的基于 vue.js 的前端库
|
||||
|
||||
## 功能预览
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Contributors
|
||||
|
||||
<a href="https://github.com/mlogclub/bbs-go/graphs/contributors"><img src="https://opencollective.com/bbs-go/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
82
bbs-go/server/.gitignore
vendored
82
bbs-go/server/.gitignore
vendored
@@ -1,41 +1,41 @@
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
.DS_Store
|
||||
|
||||
# Test binary, build with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
bbs-go
|
||||
|
||||
bbs-go.yaml
|
||||
bbs-go.prod.yaml
|
||||
bbs-go.dev.yaml
|
||||
bbs-go.test.yaml
|
||||
|
||||
.idea/*
|
||||
build/*
|
||||
|
||||
cscope.files
|
||||
tags
|
||||
|
||||
logs/*.log
|
||||
web/*
|
||||
tmp/*
|
||||
admin/*
|
||||
|
||||
internal/web*
|
||||
|
||||
cmd/generator/*
|
||||
go.work
|
||||
go.work.sum
|
||||
|
||||
ip2region.xdb
|
||||
|
||||
__debug_bin*
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
.DS_Store
|
||||
|
||||
# Test binary, build with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
bbs-go
|
||||
|
||||
bbs-go.yaml
|
||||
bbs-go.prod.yaml
|
||||
bbs-go.dev.yaml
|
||||
bbs-go.test.yaml
|
||||
|
||||
.idea/*
|
||||
build/*
|
||||
|
||||
cscope.files
|
||||
tags
|
||||
|
||||
logs/*.log
|
||||
web/*
|
||||
tmp/*
|
||||
admin/*
|
||||
|
||||
internal/web*
|
||||
|
||||
cmd/generator/*
|
||||
go.work
|
||||
go.work.sum
|
||||
|
||||
ip2region.xdb
|
||||
|
||||
__debug_bin*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1,2 @@
|
||||
## 介绍
|
||||
该项目使用Golang进行构建,具体参见:https://mlog.club
|
||||
## 介绍
|
||||
该项目使用Golang进行构建,具体参见:https://mlog.club
|
||||
|
||||
@@ -1,65 +1,65 @@
|
||||
Port: 8082 # 端口
|
||||
BaseUrl: https://mlog.club # 网站域名
|
||||
IpDataPath: # IP数据文件,默认读取当前目录下ip2region.xdb文件,最新数据文件请从这里下载:https://github.com/lionsoul2014/ip2region/tree/master/data
|
||||
AllowedOrigins:
|
||||
- "*"
|
||||
|
||||
# 日志配置
|
||||
Logger:
|
||||
Filename: /data/logs/bbs-go.log # 日志文件的位置
|
||||
MaxSize: 100 # 文件最大尺寸(以MB为单位)
|
||||
MaxAge: 10 # 保留旧文件的最大天数
|
||||
MaxBackups: 10 # 保留的最大旧文件数量
|
||||
|
||||
|
||||
# 数据库连接
|
||||
DB:
|
||||
Url: username:password@tcp(localhost:3306)/bbsgo_db?charset=utf8mb4&parseTime=True&multiStatements=true&loc=Local
|
||||
MaxIdleConns: 50
|
||||
MaxOpenConns: 200
|
||||
|
||||
# 上传配置
|
||||
Uploader:
|
||||
# 启用上传方式
|
||||
Enable: Oss
|
||||
# 阿里云oss配置
|
||||
AliyunOss:
|
||||
Host: # 阿里云OSS资源外网访问地址
|
||||
Bucket: # 阿里云OSS bucket名称
|
||||
Endpoint: # 阿里云OSS Endpoint
|
||||
AccessId: # 阿里云OSS accessID
|
||||
AccessSecret: # 阿里云OSS accessKey
|
||||
StyleSplitter: # 阿里云oss图片样式分隔符
|
||||
StyleAvatar: # 头像图片样式名称
|
||||
StylePreview: # 预览图片样式名称
|
||||
StyleSmall: # 小图样式名称
|
||||
StyleDetail: # 详情图片样式名称
|
||||
# 本地文件上传
|
||||
Local:
|
||||
Host: https://st.mlog.club/ # 上传文件域名
|
||||
Path: /data/www/st.mlog.club # 上传目录
|
||||
|
||||
# 邮件服务器配置,用于邮件通知
|
||||
Smtp:
|
||||
Host: # smtp服务地址,请设置成你自己的,例如:smtp.qq.com
|
||||
Port: # smtp服务端口,请设置成你自己额,例如:25
|
||||
Username: # 请配置成你自己的
|
||||
Password: # 请配置成你自己的
|
||||
SSL: true
|
||||
|
||||
# 百度SEO相关配置
|
||||
# 文档:https://ziyuan.baidu.com/college/courseinfo?id=267&page=2#h2_article_title14
|
||||
BaiduSEO:
|
||||
Site:
|
||||
Token:
|
||||
|
||||
# 神马搜索SEO相关
|
||||
# 文档:https://zhanzhang.sm.cn/open/mip
|
||||
SmSEO:
|
||||
Site:
|
||||
UserName:
|
||||
Token:
|
||||
|
||||
# search
|
||||
Search:
|
||||
Port: 8082 # 端口
|
||||
BaseUrl: https://mlog.club # 网站域名
|
||||
IpDataPath: # IP数据文件,默认读取当前目录下ip2region.xdb文件,最新数据文件请从这里下载:https://github.com/lionsoul2014/ip2region/tree/master/data
|
||||
AllowedOrigins:
|
||||
- "*"
|
||||
|
||||
# 日志配置
|
||||
Logger:
|
||||
Filename: /data/logs/bbs-go.log # 日志文件的位置
|
||||
MaxSize: 100 # 文件最大尺寸(以MB为单位)
|
||||
MaxAge: 10 # 保留旧文件的最大天数
|
||||
MaxBackups: 10 # 保留的最大旧文件数量
|
||||
|
||||
|
||||
# 数据库连接
|
||||
DB:
|
||||
Url: username:password@tcp(localhost:3306)/bbsgo_db?charset=utf8mb4&parseTime=True&multiStatements=true&loc=Local
|
||||
MaxIdleConns: 50
|
||||
MaxOpenConns: 200
|
||||
|
||||
# 上传配置
|
||||
Uploader:
|
||||
# 启用上传方式
|
||||
Enable: Oss
|
||||
# 阿里云oss配置
|
||||
AliyunOss:
|
||||
Host: # 阿里云OSS资源外网访问地址
|
||||
Bucket: # 阿里云OSS bucket名称
|
||||
Endpoint: # 阿里云OSS Endpoint
|
||||
AccessId: # 阿里云OSS accessID
|
||||
AccessSecret: # 阿里云OSS accessKey
|
||||
StyleSplitter: # 阿里云oss图片样式分隔符
|
||||
StyleAvatar: # 头像图片样式名称
|
||||
StylePreview: # 预览图片样式名称
|
||||
StyleSmall: # 小图样式名称
|
||||
StyleDetail: # 详情图片样式名称
|
||||
# 本地文件上传
|
||||
Local:
|
||||
Host: https://st.mlog.club/ # 上传文件域名
|
||||
Path: /data/www/st.mlog.club # 上传目录
|
||||
|
||||
# 邮件服务器配置,用于邮件通知
|
||||
Smtp:
|
||||
Host: # smtp服务地址,请设置成你自己的,例如:smtp.qq.com
|
||||
Port: # smtp服务端口,请设置成你自己额,例如:25
|
||||
Username: # 请配置成你自己的
|
||||
Password: # 请配置成你自己的
|
||||
SSL: true
|
||||
|
||||
# 百度SEO相关配置
|
||||
# 文档:https://ziyuan.baidu.com/college/courseinfo?id=267&page=2#h2_article_title14
|
||||
BaiduSEO:
|
||||
Site:
|
||||
Token:
|
||||
|
||||
# 神马搜索SEO相关
|
||||
# 文档:https://zhanzhang.sm.cn/open/mip
|
||||
SmSEO:
|
||||
Site:
|
||||
UserName:
|
||||
Token:
|
||||
|
||||
# search
|
||||
Search:
|
||||
IndexPath: # 索引路径
|
||||
Reference in New Issue
Block a user