summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDejavu Moe <[email protected]>2023-05-10 18:29:58 +0800
committerDejavu Moe <[email protected]>2023-05-10 18:29:58 +0800
commit218d375b0e849e41e9268756205a79eadaa59b0b (patch)
tree5351ddc3254f9fc796736bd28fce872953d778a2
parent0682f0fb264e2a4a19c8a17a4a6be6d874f48bd1 (diff)
downloadself-hosted-218d375b0e849e41e9268756205a79eadaa59b0b.tar.gz
self-hosted-218d375b0e849e41e9268756205a79eadaa59b0b.zip
add busuanzi
-rw-r--r--busuanzi/data/busuanzi/config.yaml15
-rw-r--r--busuanzi/docker-compose.yaml22
2 files changed, 37 insertions, 0 deletions
diff --git a/busuanzi/data/busuanzi/config.yaml b/busuanzi/data/busuanzi/config.yaml
new file mode 100644
index 0000000..7482c5c
--- /dev/null
+++ b/busuanzi/data/busuanzi/config.yaml
@@ -0,0 +1,15 @@
+Web:
+ Address: 0.0.0.0:8080 # 监听地址
+ Access-Control-Allow-Origin: "https://bsz.yourdomain.com" # 跨域访问
+ Debug: false # 是否开启debug模式
+ Log: true # 是否开启日志
+Redis:
+ Address: redis:6379 # redis地址
+ Password:
+ Database: 0
+ Prefix: bsz # redis前缀
+ MaxIdle: 25 # 最大空闲连接数
+ MaxActive: 100 # 最大连接数
+Bsz:
+ Expire: 2592000 # 统计数据过期时间 单位秒, 请输入整数 (无任何访问, 超过这个时间后, 统计数据将被清空, 0为不过期)
+ JwtSecret: "bsz" # JWT签名密钥 // 请设置为任意长度的随机值
diff --git a/busuanzi/docker-compose.yaml b/busuanzi/docker-compose.yaml
new file mode 100644
index 0000000..fc3cb29
--- /dev/null
+++ b/busuanzi/docker-compose.yaml
@@ -0,0 +1,22 @@
+version: "3"
+services:
+ redis:
+ image: "redis:alpine"
+ restart: always
+ volumes:
+ - ./data/redis:/data
+
+ busuanzi:
+ image: "dejavumoe/busuanzi:latest"
+ restart: always
+ ports:
+ - "127.0.0.1:8956:8080"
+ volumes:
+ - ./data/busuanzi:/app/expose
+ links:
+ - redis
+ depends_on:
+ - redis
+ environment:
+ LOG_ENABLE: true
+ API_SERVER: http:\/\/127.0.0.1:8080\/api