chore: 增加 Docker 单容器部署
生产用 Dockerfile + compose 嵌入前端二进制,run.sh docker 一键构建启动。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
95405de119
commit
cb1a9be2c4
7 files changed
+224
-4
No files matched your search
+11
-2
@@ -1,5 +1,6 @@
|
||||
# opsx-licence - 环境变量配置模板
|
||||
# 复制此文件为 .env 并根据需要修改
|
||||
# Docker: cp .env.example .env && ./run.sh docker up
|
||||
|
||||
# ============================================
|
||||
# 后端配置 (backend)
|
||||
@@ -8,8 +9,8 @@
|
||||
# 服务器端口
|
||||
PORT=9001
|
||||
|
||||
# 运行模式: debug / release
|
||||
GIN_MODE=debug
|
||||
# 运行模式: debug / release(生产 / Docker 请用 release)
|
||||
GIN_MODE=release
|
||||
|
||||
# JWT 密钥(生产环境必须修改!)
|
||||
JWT_SECRET=your-super-secret-key-change-this-in-production
|
||||
@@ -17,6 +18,7 @@ JWT_SECRET=your-super-secret-key-change-this-in-production
|
||||
# 数据库配置
|
||||
# 可选: sqlite / mysql / postgres
|
||||
DB_DRIVER=sqlite
|
||||
# 本地开发可用相对路径;Docker Compose 会覆盖为 /data/db.sqlite3
|
||||
DB_NAME=db.sqlite3
|
||||
|
||||
# MySQL 配置(使用 mysql 时填写)
|
||||
@@ -55,6 +57,13 @@ SUCCESS_URL=opsxshell://pro/activated
|
||||
# PEM 私钥仅保存在服务端,切勿下发到客户端或写入仓库
|
||||
# WAFFO_PRIVATE_KEY_PEM=
|
||||
|
||||
# ============================================
|
||||
# Docker Compose
|
||||
# ============================================
|
||||
# 宿主机映射端口(容器内固定 9001)
|
||||
HOST_PORT=9001
|
||||
VERSION=latest
|
||||
|
||||
# ============================================
|
||||
# 前端配置 (frontend)
|
||||
# ============================================
|
||||
|
||||
Reference in new issue
Block a user