feat(widget): 优化访客在线轨迹、GeoIP与多站点渠道
CI / Frontend (typecheck + lint + build) (push) Successful in 2m5s
CI / Backend (go vet + test) (push) Failing after 5m20s

This commit is contained in:
yml2213
2026-11-06 18:21:30 +08:00
parent 24fac1bcf1
commit 38d6fc1684
37 changed files with 1071 additions and 123 deletions
+20
View File
@@ -0,0 +1,20 @@
# GeoIP 数据库
部署脚本会在文件缺失或超过 30 天时自动下载:
```text
deploy/geoip/GeoLite2-City.mmdb
```
Docker Compose 会把本目录只读挂载到 API 容器的 `/app/geoip`,默认读取:
```text
GEOIP_DB_PATH=/app/geoip/GeoLite2-City.mmdb
```
可通过 `GEOIP_DB_URL` 覆盖下载源,或将自有 MaxMind GeoIP2 City 文件放到上述路径。
下载失败时服务仍可正常启动,IP 地区会降级到 CDN 国家请求头或“未知”。
更换数据库后重启 API 容器即可生效。
默认下载源是公开的 GeoLite2 镜像。正式商用请遵守 MaxMind GeoLite2
许可与署名要求,或通过 `GEOIP_DB_URL` 指向自有授权下载地址。