chore: 增加 Docker 单容器部署

生产用 Dockerfile + compose 嵌入前端二进制,run.sh docker 一键构建启动。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Logan.LiandCursor committed 2026-08-12 12:02:29 +08:00
1 parent 95405de119
commit cb1a9be2c4
7 files changed
+224 -4

No files matched your search

+10 -1
View File
@@ -1,7 +1,7 @@
# opsx-licence - Makefile
# 提供常用开发命令的快捷方式
.PHONY: help install dev build build-ui build-api build-binary clean status stop restart lint test
.PHONY: help install dev build build-ui build-api build-binary docker-up docker-down clean status stop restart lint test
# 默认显示帮助
help:
@@ -13,6 +13,8 @@ help:
@echo " make build-ui - 仅构建前端"
@echo " make build-api - 仅构建后端"
@echo " make build-binary - 构建前端嵌入式单二进制 opsx-licence"
@echo " make docker-up - Docker 构建并启动"
@echo " make docker-down - 停止 Docker 容器"
@echo " make test - 运行后端测试"
@echo " make lint - 运行代码检查"
@echo " make clean - 清理构建产物和日志"
@@ -50,6 +52,13 @@ build: build-ui build-api
build-binary:
./run.sh build
# Docker 部署 // Logan.Li
docker-up:
./run.sh docker up
docker-down:
./run.sh docker down
# 后端测试
test:
@echo "🧪 运行后端测试..."