Merge branch 'main' into dev

pull/225/head
Michael Li 2 years ago
commit 4db85e0c53
No known key found for this signature in database

1
.gitignore vendored

@ -1,3 +1,4 @@
.DS_Store
.idea .idea
.vscode .vscode
!*.example !*.example

@ -1,5 +1,5 @@
# build frontend # build frontend
FROM node:18-alpine as frontend FROM node:19-alpine as frontend
ARG API_HOST ARG API_HOST
ARG USE_API_HOST=yes ARG USE_API_HOST=yes
ARG EMBED_UI=yes ARG EMBED_UI=yes
@ -11,7 +11,7 @@ RUN [ $EMBED_UI != yes ] || [ $USE_DIST != no ] || (yarn && yarn build)
RUN [ $EMBED_UI = yes ] || mkdir dist || echo "" RUN [ $EMBED_UI = yes ] || mkdir dist || echo ""
# build backend # build backend
FROM golang:1.18-alpine AS backend FROM golang:1.20-alpine AS backend
ARG API_HOST ARG API_HOST
ARG USE_API_HOST=yes ARG USE_API_HOST=yes
ARG EMBED_UI=yes ARG EMBED_UI=yes
@ -28,7 +28,7 @@ ENV GOPROXY=https://goproxy.cn
RUN [ $EMBED_UI != yes ] || make build TAGS='embed go_json' RUN [ $EMBED_UI != yes ] || make build TAGS='embed go_json'
RUN [ $EMBED_UI = yes ] || make build TAGS='go_json' RUN [ $EMBED_UI = yes ] || make build TAGS='go_json'
FROM alpine:3.16 FROM alpine:3.17
ARG API_HOST ARG API_HOST
ARG USE_API_HOST=yes ARG USE_API_HOST=yes
ARG EMBED_UI=yes ARG EMBED_UI=yes

@ -8,23 +8,23 @@ App: # APP基础设置项
Server: # 服务设置 Server: # 服务设置
RunMode: debug RunMode: debug
HttpIp: 0.0.0.0 HttpIp: 0.0.0.0
HttpPort: 8008 HttpPort: 8010
ReadTimeout: 60 ReadTimeout: 60
WriteTimeout: 60 WriteTimeout: 60
Features: Features:
Default: ["Base", "MySQL", "Option", "Zinc", "LocalOSS", "LoggerFile", "Friendship", "Deprecated"] Default: ["Web", "Frontend:EmbedWeb", "Zinc", "LocalOSS", "MySQL", "BigCacheIndex", "LoggerZinc", "Friendship"]
Develop: ["Base", "MySQL", "BigCacheIndex", "Meili", "Sms", "AliOSS", "LoggerMeili", "OSS:Retention"] Develop: ["Base", "MySQL", "BigCacheIndex", "Meili", "Sms", "AliOSS", "LoggerMeili", "OSS:Retention"]
Demo: ["Base", "MySQL", "Option", "Zinc", "Sms", "MinIO", "LoggerZinc", "Migration"] Demo: ["Base", "MySQL", "Option", "Zinc", "Sms", "MinIO", "LoggerZinc", "Migration"]
Slim: ["Base", "Sqlite3", "LocalOSS", "LoggerFile", "OSS:TempDir"] Slim: ["Base", "Sqlite3", "LocalOSS", "LoggerFile", "OSS:TempDir"]
Base: ["Redis", "PhoneBind"] Base: ["Redis", "PhoneBind"]
Docs: ["Docs:OpenAPI"] Docs: ["Docs:OpenAPI"]
Deprecated: ["Deprecated:OldWeb"] Deprecated: ["Deprecated:OldWeb"]
Service: ["Web", "Admin", "SpaceX", "Bot", "LocalOSS", "Mobile", "Frontend:Web", "Fronetend:EmbedWeb", "Docs"] Service: ["Web", "Admin", "SpaceX", "Bot", "LocalOSS", "Mobile", "Frontend:Web", "Frontend:EmbedWeb", "Docs"]
Option: ["SimpleCacheIndex"] Option: ["SimpleCacheIndex"]
Sms: "SmsJuhe" Sms: "SmsJuhe"
WebServer: # Web服务 WebServer: # Web服务
HttpIp: 0.0.0.0 HttpIp: 0.0.0.0
HttpPort: 8010 HttpPort: 8008
ReadTimeout: 60 ReadTimeout: 60
WriteTimeout: 60 WriteTimeout: 60
AdminServer: # Admin后台运维服务 AdminServer: # Admin后台运维服务
@ -84,7 +84,7 @@ BigCacheIndex: # 使用BigCache缓存泡泡广场消息流
Logger: # 日志通用配置 Logger: # 日志通用配置
Level: debug # 日志级别 panic|fatal|error|warn|info|debug|trace Level: debug # 日志级别 panic|fatal|error|warn|info|debug|trace
LoggerFile: # 使用File写日志 LoggerFile: # 使用File写日志
SavePath: data/paopao-ce/logs SavePath: custom/data/paopao-ce/logs
FileName: app FileName: app
FileExt: .log FileExt: .log
LoggerZinc: # 使用Zinc写日志 LoggerZinc: # 使用Zinc写日志
@ -154,7 +154,7 @@ S3: # Amazon S3 存储配置
Bucket: paopao Bucket: paopao
Domain: Domain:
LocalOSS: # 本地文件OSS存储配置 LocalOSS: # 本地文件OSS存储配置
SavePath: data/paopao-ce/oss SavePath: custom/data/paopao-ce/oss
Secure: False Secure: False
Bucket: paopao Bucket: paopao
Domain: 127.0.0.1:8008 Domain: 127.0.0.1:8008
@ -179,7 +179,7 @@ Postgres: # PostgreSQL数据库
SSLMode: disable SSLMode: disable
TimeZone: Asia/Shanghai TimeZone: Asia/Shanghai
Sqlite3: # Sqlite3数据库 Sqlite3: # Sqlite3数据库
Path: data/sqlite3/paopao-ce.db Path: custom/data/sqlite3/paopao-ce.db
Redis: Redis:
Host: redis:6379 Host: redis:6379
Password: Password:

@ -11,9 +11,9 @@ services:
MYSQL_RANDOM_ROOT_PASSWORD: yes MYSQL_RANDOM_ROOT_PASSWORD: yes
volumes: volumes:
- ./scripts/paopao-mysql.sql:/docker-entrypoint-initdb.d/paopao.sql - ./scripts/paopao-mysql.sql:/docker-entrypoint-initdb.d/paopao.sql
- ./data/mysql/data:/var/lib/mysql - ./custom/data/mysql/data:/var/lib/mysql
ports: ports:
- 127.0.0.1::3306 - 3306:3306
networks: networks:
- paopao-network - paopao-network
@ -76,15 +76,15 @@ services:
# networks: # networks:
# - paopao-network # - paopao-network
pyroscope: # pyroscope:
image: pyroscope/pyroscope:latest # image: pyroscope/pyroscope:latest
restart: always # restart: always
ports: # ports:
- 4040:4040 # - 4040:4040
command: # command:
- 'server' # - 'server'
networks: # networks:
- paopao-network # - paopao-network
phpmyadmin: phpmyadmin:
image: phpmyadmin:5.2 image: phpmyadmin:5.2
@ -100,8 +100,7 @@ services:
- paopao-network - paopao-network
backend: backend:
build: image: bitbus/paopao-ce:latest
context: .
restart: always restart: always
depends_on: depends_on:
- db - db
@ -110,7 +109,7 @@ services:
# modify below to reflect your custom configure # modify below to reflect your custom configure
volumes: volumes:
- ./config.yaml.sample:/app/paopao-ce/config.yaml - ./config.yaml.sample:/app/paopao-ce/config.yaml
- ./data/paopao-ce/data:/app/paopao-ce/data - ./custom:/app/paopao-ce/custom
ports: ports:
- 8008:8008 - 8008:8008
networks: networks:

@ -0,0 +1,39 @@
Features:
Default: ["Sqlite3", "Zinc", "LocalOSS", "LoggerZinc", "BigCacheIndex", "Friendship", "Frontend:EmbedWeb", "Web"]
BigCacheIndex: # 使用BigCache缓存泡泡广场消息流
MaxIndexPage: 1024 # 最大缓存页数必须是2^n, 代表最大同时缓存多少页数据
HardMaxCacheSize: 256 # 最大缓存大小(MB)0表示无限制
WebServer: # Web服务
HttpIp: 0.0.0.0
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
Expire: 86400
Zinc: # Zinc搜索配置
Host: 127.0.0.1:4080
Index: paopao-data
User: admin
Password: admin
Secure: False
LocalOSS: # 本地文件OSS存储配置
SavePath: custom/data/oss
Secure: True
Bucket: paopao
Domain: api.alimy.me
Sqlite3: # Sqlite3数据库
Path: custom/data/sqlite3/paopao-ce.db
Redis:
Host: 127.0.0.1:6379
Password:
DB:

@ -283,7 +283,7 @@ CREATE TABLE `p_contact` (
`status` tinyint NOT NULL DEFAULT '0' COMMENT '好友状态: 1请求好友, 2已好友, 3拒绝好友, 4已删好友', `status` tinyint NOT NULL DEFAULT '0' COMMENT '好友状态: 1请求好友, 2已好友, 3拒绝好友, 4已删好友',
`is_top` tinyint NOT NULL DEFAULT '0' COMMENT '是否置顶, 0否, 1是', `is_top` tinyint NOT NULL DEFAULT '0' COMMENT '是否置顶, 0否, 1是',
`is_black` tinyint NOT NULL DEFAULT '0' COMMENT '是否为黑名单, 0否, 1是', `is_black` tinyint NOT NULL DEFAULT '0' COMMENT '是否为黑名单, 0否, 1是',
`is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除好友, 0否, 1是', `is_del` tinyint NOT NULL DEFAULT '0' COMMENT '是否删除好友, 0否, 1是',
`notice_enable` tinyint NOT NULL DEFAULT '0' COMMENT '是否有消息提醒, 0否, 1是', `notice_enable` tinyint NOT NULL DEFAULT '0' COMMENT '是否有消息提醒, 0否, 1是',
`created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
@ -301,7 +301,7 @@ CREATE TABLE `p_contact_group` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '联系人ID', `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '联系人ID',
`user_id` int NOT NULL DEFAULT '0' COMMENT '用户id', `user_id` int NOT NULL DEFAULT '0' COMMENT '用户id',
`name` varchar(32) NOT NULL DEFAULT '' COMMENT '分组名称', `name` varchar(32) NOT NULL DEFAULT '' COMMENT '分组名称',
`is_delete` tinyint NOT NULL DEFAULT '1' COMMENT '是否删除, 0否, 1是', `is_del` tinyint NOT NULL DEFAULT '1' COMMENT '是否删除, 0否, 1是',
`created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间', `created_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间', `modified_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
`deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间', `deleted_on` bigint unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',

@ -103,7 +103,7 @@ CREATE TABLE "p_contact" (
"status" integer NOT NULL, "status" integer NOT NULL,
"is_top" integer NOT NULL, "is_top" integer NOT NULL,
"is_black" integer NOT NULL, "is_black" integer NOT NULL,
"is_delete" integer NOT NULL, "is_del" integer NOT NULL,
"notice_enable" integer NOT NULL, "notice_enable" integer NOT NULL,
"created_on" integer NOT NULL, "created_on" integer NOT NULL,
"modified_on" integer NOT NULL, "modified_on" integer NOT NULL,
@ -119,7 +119,7 @@ CREATE TABLE "p_contact_group" (
"id" integer NOT NULL, "id" integer NOT NULL,
"user_id" integer NOT NULL, "user_id" integer NOT NULL,
"name" text(32) NOT NULL, "name" text(32) NOT NULL,
"is_delete" integer NOT NULL, "is_del" integer NOT NULL,
"created_on" integer NOT NULL, "created_on" integer NOT NULL,
"modified_on" integer NOT NULL, "modified_on" integer NOT NULL,
"deleted_on" integer NOT NULL, "deleted_on" integer NOT NULL,

Loading…
Cancel
Save