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:
@@ -5,10 +5,10 @@
|
||||
# docker compose --profile minio up -d # 可选:S3 引擎冒烟(FCB_STORAGE_ENGINE=s3)
|
||||
# docker compose --profile webdav up -d # 可选:WebDAV 引擎冒烟(FCB_STORAGE_ENGINE=webdav)
|
||||
#
|
||||
# 数据库默认 SQLite(modernc.org/sqlite 纯 Go 驱动,数据落 serverdata 卷 /app/data/filecodebox.db);
|
||||
# 数据库默认 SQLite(modernc.org/sqlite 纯 Go 驱动,数据落 serverdata 卷 /app/data/fileshare.db);
|
||||
# postgres 为可选 profile 服务,启用时 server 经 FCB_DB_DRIVER/FCB_DB_DSN 自动接入;
|
||||
# Redis 同为可选,未配置时服务端内存降级。
|
||||
name: filecodebox
|
||||
name: fileshare
|
||||
|
||||
services:
|
||||
postgres:
|
||||
@@ -18,13 +18,13 @@ services:
|
||||
# 需要时 docker compose --profile postgres up -d --build
|
||||
profiles: ["postgres"]
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-filecodebox}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-filecodebox}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-filecodebox}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-fileshare}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-fileshare}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-fileshare}
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-filecodebox}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-fileshare}"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
@@ -52,7 +52,7 @@ services:
|
||||
start_period: 5s
|
||||
environment:
|
||||
# 需求 ⑧:数据库驱动 sqlite(默认,零依赖)| postgres(需 --profile postgres)
|
||||
# 默认 SQLite:DSN 留空 → 数据库文件落 /app/data/filecodebox.db(serverdata 卷)
|
||||
# 默认 SQLite:DSN 留空 → 数据库文件落 /app/data/fileshare.db(serverdata 卷)
|
||||
# postgres 模式:在 .env 设 FCB_DB_DRIVER=postgres 与 FCB_DB_DSN(模板见 deploy/.env.example)
|
||||
FCB_DB_DRIVER: ${FCB_DB_DRIVER:-sqlite}
|
||||
FCB_DB_DSN: ${FCB_DB_DSN:-}
|
||||
@@ -67,7 +67,7 @@ services:
|
||||
FCB_LOCAL_STORAGE_PATH: /app/data
|
||||
# S3 引擎(MinIO profile)
|
||||
FCB_S3_ENDPOINT_URL: ${FCB_S3_ENDPOINT_URL:-}
|
||||
FCB_S3_BUCKET_NAME: ${FCB_S3_BUCKET_NAME:-filecodebox}
|
||||
FCB_S3_BUCKET_NAME: ${FCB_S3_BUCKET_NAME:-fileshare}
|
||||
FCB_S3_ACCESS_KEY_ID: ${FCB_S3_ACCESS_KEY_ID:-minioadmin}
|
||||
FCB_S3_SECRET_ACCESS_KEY: ${FCB_S3_SECRET_ACCESS_KEY:-minioadmin}
|
||||
FCB_S3_REGION_NAME: ${FCB_S3_REGION_NAME:-us-east-1}
|
||||
@@ -122,7 +122,7 @@ services:
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
mc alias set local http://minio:9000 ${FCB_S3_ACCESS_KEY_ID:-minioadmin} ${FCB_S3_SECRET_ACCESS_KEY:-minioadmin} &&
|
||||
mc mb --ignore-existing local/${FCB_S3_BUCKET_NAME:-filecodebox} &&
|
||||
mc mb --ignore-existing local/${FCB_S3_BUCKET_NAME:-fileshare} &&
|
||||
echo 'MinIO 桶已就绪'"
|
||||
|
||||
# WebDAV 冒烟服务器(dufs,简单读写 + Basic 认证)
|
||||
|
||||
Reference in New Issue
Block a user