From 1f9bbe96e45dcf1c653ff0061cc751540c0ade0e Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sat, 4 Mar 2023 12:24:01 +0800 Subject: [PATCH 1/3] update README.md and add docker-compose.yaml to release zip file when publish release --- Makefile | 2 +- README.md | 8 +++++--- docs/deploy/local/custom/config.yaml | 10 +--------- internal/conf/config.yaml | 6 +++--- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index bc5ced6e..7e9c76bf 100644 --- a/Makefile +++ b/Makefile @@ -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 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) diff --git a/README.md b/README.md index d2b7ddc8..36780add 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/deploy/local/custom/config.yaml b/docs/deploy/local/custom/config.yaml index 66208484..7a8d2ac0 100644 --- a/docs/deploy/local/custom/config.yaml +++ b/docs/deploy/local/custom/config.yaml @@ -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 diff --git a/internal/conf/config.yaml b/internal/conf/config.yaml index 6ea7d3c6..8713e813 100644 --- a/internal/conf/config.yaml +++ b/internal/conf/config.yaml @@ -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: From 87e288017613a27d36fe7cbc4b7bf3a8075f65dc Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sat, 4 Mar 2023 13:11:56 +0800 Subject: [PATCH 2/3] add CHANGELOG.md --- CHANGELOG.md | 39 +++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..7ec26c32 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,39 @@ +# 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.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).** \ No newline at end of file diff --git a/Makefile b/Makefile index 7e9c76bf..a2e05852 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ CGO_ENABLED := 1 endif RELEASE_ROOT = release -RELEASE_FILES = LICENSE README.md config.yaml.sample docker-compose.yaml 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) From 972d0ab9864225f34e793f1e65b3bf65ba5783db Mon Sep 17 00:00:00 2001 From: Michael Li Date: Sun, 5 Mar 2023 21:01:15 +0800 Subject: [PATCH 3/3] fixed add star to tweet error --- .gitignore | 1 + CHANGELOG.md | 6 ++++++ auto/api/v1/priv.go | 2 +- mirc/web/v1/priv.go | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 18e3b36d..6cef1340 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ paopao-ce* /release /data /custom +/.custom diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ec26c32..29722fb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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 diff --git a/auto/api/v1/priv.go b/auto/api/v1/priv.go index a29d2858..b02ee0ea 100644 --- a/auto/api/v1/priv.go +++ b/auto/api/v1/priv.go @@ -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 diff --git a/mirc/web/v1/priv.go b/mirc/web/v1/priv.go index 9c8d2af3..132e56b0 100644 --- a/mirc/web/v1/priv.go +++ b/mirc/web/v1/priv.go @@ -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"`