feat: --mode local 一键本地模式 (SQLite + redka, 无需 MySQL/Redis)
- main.go: --mode local 自动配置 db-driver=sqlite, db-name=data/sqlite3.db, redis-driver=redka
- database: 切换纯 Go SQLite 驱动 (github.com/glebarez/sqlite) — 无需 CGO
- docker-compose.yml: backend 添加 MODE=${MODE:-release} env var + data 卷挂载
- run.sh: binary upgrade 默认 --mode local, config.yaml 模板更新为 local 模式
- K8s quick-deploy.yaml: 单容器部署, MODE=local 环境变量切换远程/本地
This commit is contained in:
1 parent
9649167c83
commit
ec7aa61948
7 files changed
+75
-41
No files matched your search
@@ -60,8 +60,11 @@ services:
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- MODE=${MODE:-release}
|
||||
volumes:
|
||||
- ./backend/config.yaml:/app/config.yaml
|
||||
- ./backend/data:/app/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
depends_on:
|
||||
mysql:
|
||||
|
||||
Reference in new issue
Block a user