Merge branch 'main' into dev

pull/225/head
Michael Li 1 year ago
commit 6afd7e6a13
No known key found for this signature in database

1
.gitignore vendored

@ -8,3 +8,4 @@ paopao-ce*
/release
/data
/custom
/.custom

@ -0,0 +1,45 @@
# Changelog
All notable changes to paopao-ce are documented in this file.
## 0.3.0+dev ([`dev`](https://github.com/rocboss/paopao-ce/tree/dev))
## 0.2.2
### Fixed
- fixed add star to tweet error [#222](https://github.com/rocboss/paopao-ce/pull/222)
## 0.2.1
### Changed
- optimize docker-compose.yaml use bitbus/paopao-ce:latest as release image [#217](https://github.com/rocboss/paopao-ce/pull/217)
### Fixed
- fixed sql ddl in scripts/paopao-mysql.sql and scripts/paopao-sqlite3.sql [#217](https://github.com/rocboss/paopao-ce/pull/217)
## 0.2.0
### Added
- add `Friendship` feature [#192](https://github.com/rocboss/paopao-ce/pull/192)
- add `Lightship` feature [#198](https://github.com/rocboss/paopao-ce/pull/198)
- add `Pyroscope` feature [#199](https://github.com/rocboss/paopao-ce/pull/199)
- add new `Web` service [#196](https://github.com/rocboss/paopao-ce/pull/196)
- add `Frontend:Web` feature [#196](https://github.com/rocboss/paopao-ce/pull/196)
- add `Deprecated:OldWeb` feature [#196](https://github.com/rocboss/paopao-ce/pull/196)
### Changes
- support run multiple service in single paopao-ce instance [#196](https://github.com/rocboss/paopao-ce/pull/196)
- use [go-mir](https://github.com/alimy/mir) optimize paopao-ce source code architecture [#196](https://github.com/rocboss/paopao-ce/pull/196)
### Fixed
- some other features optimize and bug fix
---
**Older change logs can be found on [GitHub](https://github.com/rocboss/paopao-ce/releases?after=v0.2.0).**

@ -10,7 +10,7 @@ CGO_ENABLED := 1
endif
RELEASE_ROOT = release
RELEASE_FILES = LICENSE README.md config.yaml.sample scripts docs
RELEASE_FILES = LICENSE README.md CHANGELOG.md config.yaml.sample docker-compose.yaml scripts docs
RELEASE_LINUX_AMD64 = $(RELEASE_ROOT)/linux-amd64/$(TARGET)
RELEASE_DARWIN_AMD64 = $(RELEASE_ROOT)/darwin-amd64/$(TARGET)
RELEASE_DARWIN_ARM64 = $(RELEASE_ROOT)/darwin-arm64/$(TARGET)

@ -194,7 +194,10 @@ PaoPao主要由以下优秀的开源项目/工具构建
docker build -t your/paopao-ce:tag --build-arg EMBED_UI=no .
# 运行
docker run -d -p 8008:8008 -v ${PWD}/config.yaml.sample:/app/paopao-ce/config.yaml your/paopao-ce:tag
mkdir custom && docker run -d -p 8008:8008 -v ${PWD}/custom:/app/paopao-ce/custom -v ${PWD}/config.yaml.sample:/app/paopao-ce/config.yaml your/paopao-ce:tag
# 或者直接运行构建好的docker image
mkdir custom && docker run -d -p 8008:8008 -v ${PWD}/custom:/app/paopao-ce/custom -v ${PWD}/config.yaml.sample:/app/paopao-ce/config.yaml bitbus/paopao-ce:latest
```
* 前端:
@ -227,8 +230,7 @@ docker compose up --build
# file: docker-compose.yaml
...
backend:
build:
context: .
image: bitbus/paopao-ce:latest
restart: always
depends_on:
- db

@ -206,7 +206,7 @@ func RegisterPrivServant(e *gin.Engine, s Priv, b PrivBinding, r PrivRender) {
r.RenderCollectionTweet(c, resp, err)
})
router.Handle("POST", "/post/start", func(c *gin.Context) {
router.Handle("POST", "/post/star", func(c *gin.Context) {
select {
case <-c.Request.Context().Done():
return

@ -1,5 +1,5 @@
Features:
Default: ["Sqlite3", "Zinc", "LocalOSS", "LoggerZinc", "BigCacheIndex", "Friendship", "Frontend:EmbedWeb", "Web"]
Default: ["Sqlite3", "Zinc", "LocalOSS", "LoggerFile", "BigCacheIndex", "Friendship", "Frontend:EmbedWeb", "Web"]
BigCacheIndex: # 使用BigCache缓存泡泡广场消息流
MaxIndexPage: 1024 # 最大缓存页数必须是2^n, 代表最大同时缓存多少页数据
HardMaxCacheSize: 256 # 最大缓存大小(MB)0表示无限制
@ -8,14 +8,6 @@ WebServer: # Web服务
HttpPort: 8008
ReadTimeout: 60
WriteTimeout: 60
Logger: # 日志通用配置
Level: debug # 日志级别 panic|fatal|error|warn|info|debug|trace
LoggerZinc: # 使用Zinc写日志
Host: 127.0.0.1:4080
Index: paopao-log
User: admin
Password: admin
Secure: False
JWT: # 鉴权加密
Secret: 18a6413dc4fe394c66345ebe501b2f26
Issuer: paopao-api

@ -81,7 +81,7 @@ Pyroscope: # Pyroscope配置
Logger: # 日志通用配置
Level: debug # 日志级别 panic|fatal|error|warn|info|debug|trace
LoggerFile: # 使用File写日志
SavePath: data/paopao-ce/logs
SavePath: custom/data/paopao-ce/logs
FileName: app
FileExt: .log
LoggerZinc: # 使用Zinc写日志
@ -151,7 +151,7 @@ S3: # Amazon S3 存储配置
Bucket: paopao
Domain:
LocalOSS: # 本地文件OSS存储配置
SavePath: data/paopao-ce/oss
SavePath: custom/data/paopao-ce/oss
Secure: False
Bucket: paopao
Domain: 127.0.0.1:8008
@ -176,7 +176,7 @@ Postgres: # PostgreSQL数据库
SSLMode: disable
TimeZone: Asia/Shanghai
Sqlite3: # Sqlite3数据库
Path: data/sqlite3/paopao-ce.db
Path: custom/data/sqlite3/paopao-ce.db
Redis:
Host: redis:6379
Password:

@ -31,7 +31,7 @@ type Priv struct {
DeleteTweet func(Delete, web.DeleteTweetReq) `mir:"/post"`
// StarTweet 动态点赞操作
StarTweet func(Post, web.StarTweetReq) web.StarTweetResp `mir:"/post/start"`
StarTweet func(Post, web.StarTweetReq) web.StarTweetResp `mir:"/post/star"`
// CollectionTweet 动态收藏操作
CollectionTweet func(Post, web.CollectionTweetReq) web.CollectionTweetResp `mir:"/post/collection"`

Loading…
Cancel
Save