26.9:品牌统一(fileshare)+ 版本号改为日期式
- 数据库默认文件 filecodebox.db → fileshare.db(config.go 默认值与全部文档/编排同步)
- Go module filecodebox → fileshare(全部 import 同步,build/vet/test 全绿)
- 应用版本 APP_VERSION 2.5.6 → 26.9(health 接口已验证返回 26.9)
- deploy 编排统一:compose 项目名、Postgres 默认凭据、minio 桶名、env 注释
- JWT issuer、存储临时目录前缀、web 包名同步 fileshare
- CI:镜像 tag 以 APP_VERSION 为唯一版本源,main/tag 推送即发布
${VER} + latest;tag 触发时校验 tag 名与 APP_VERSION 一致,防错版
- 本地开发库文件已改名 fileshare.db(含 -shm/-wal 清理)
This commit is contained in:
+4
-4
@@ -30,7 +30,7 @@ docker compose up -d --build
|
||||
# 打开 http://localhost:8466(.env 可用 WEB_PORT 改端口)→ 自动跳转 /setup 完成初始化
|
||||
```
|
||||
|
||||
- 数据落 **`serverdata` 卷**:容器内 `/app/data/filecodebox.db`(WAL 模式,父目录自动创建)。
|
||||
- 数据落 **`serverdata` 卷**:容器内 `/app/data/fileshare.db`(WAL 模式,父目录自动创建)。
|
||||
- `.env` 中 Postgres 段变量(`POSTGRES_USER/PASSWORD/DB`)在此模式下不生效,无需修改。
|
||||
|
||||
### 路径 ②:Postgres 模式(可选)
|
||||
@@ -39,7 +39,7 @@ docker compose up -d --build
|
||||
|
||||
```dotenv
|
||||
FCB_DB_DRIVER=postgres
|
||||
FCB_DB_DSN=postgres://filecodebox:filecodebox@postgres:5432/filecodebox?sslmode=disable
|
||||
FCB_DB_DSN=postgres://fileshare:fileshare@postgres:5432/fileshare?sslmode=disable
|
||||
```
|
||||
|
||||
2. 带 postgres profile 启动(server 会等 postgres 健康检查通过后再启动):
|
||||
@@ -65,7 +65,7 @@ docker compose up -d --build
|
||||
```bash
|
||||
# S3 引擎(MinIO 冒烟)
|
||||
docker compose --profile minio up -d --build # .env: FCB_STORAGE_ENGINE=s3
|
||||
# minio-init 一次性任务自动建桶(mc mb filecodebox)
|
||||
# minio-init 一次性任务自动建桶(mc mb fileshare)
|
||||
|
||||
# WebDAV 引擎(dufs 冒烟,Basic 认证 admin/admin123@/:rw)
|
||||
docker compose --profile webdav up -d --build # .env: FCB_STORAGE_ENGINE=webdav
|
||||
@@ -125,7 +125,7 @@ curl -I http://localhost:8466/docs # 200(SPA 回退)
|
||||
或在 `.env` 设 `FCB_ADMIN_PASSWORD`(≥8 位)让服务启动即自动初始化,
|
||||
消除「公网上被抢先访问 /setup 接管」的窗口。初始化完成后建议从 `.env` 移除该变量。
|
||||
3. **修改组件默认凭据**:minio(`minioadmin/minioadmin`)、webdav(`admin/admin123`)、
|
||||
Postgres(`filecodebox/filecodebox`)默认凭据仅限本机冒烟;对外部署必须修改,
|
||||
Postgres(`fileshare/fileshare`)默认凭据仅限本机冒烟;对外部署必须修改,
|
||||
且不建议把 9000/9001/5005 端口发布到公网(compose 中删除对应 `ports` 或仅绑 127.0.0.1)。
|
||||
4. **Postgres 建议启用 TLS**:默认示例 DSN 为 `sslmode=disable`,生产请改为
|
||||
`sslmode=require` 及以上。
|
||||
|
||||
Reference in New Issue
Block a user