Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
law_order
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王超
law_order
Commits
dde80025
提交
dde80025
authored
7月 20, 2026
作者:
zhanglu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v1 docker build
上级
ade792f7
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
17 行增加
和
15 行删除
+17
-15
.gitignore
.gitignore
+3
-2
.dockerignore
backend/.dockerignore
+0
-1
Dockerfile
backend/Dockerfile
+7
-8
requirements.txt
backend/requirements.txt
+3
-0
Dockerfile
frontend/Dockerfile
+2
-2
nginx.conf
frontend/nginx/nginx.conf
+2
-2
没有找到文件。
.gitignore
浏览文件 @
dde80025
...
...
@@ -2,4 +2,5 @@
chunk_*.js
vendor.js
manifest.js
frontend/node_modules
\ No newline at end of file
frontend/node_modules
.idea
\ No newline at end of file
backend/.dockerignore
浏览文件 @
dde80025
__pycache__
*.pyc
*.pyo
.env
.venv
node_modules
tests
...
...
backend/Dockerfile
浏览文件 @
dde80025
# Backend — Python 3.11 + FastAPI + uvicorn
FROM
python:3.11-slim
FROM
docker.1ms.run/
python:3.11-slim
WORKDIR
/
app
WORKDIR
/
law_order
# Install dependencies
COPY
requirements.txt .
RUN
pip
install
--no-cache-dir
-r
requirements.txt
RUN
pip
install
--no-cache-dir
-r
requirements.txt
-i
https://pypi.tuna.tsinghua.edu.cn/simple
# Copy source
COPY
main.py main.py
COPY
app/ app/
COPY
.env .env
# Create directories
RUN
mkdir
-p
/app/data /app/logs
COPY
app/ /law_order/app
COPY
data/ /law_order/data
COPY
logs/ /law_order/logs
COPY
.env /law_order/.env
EXPOSE
8080
...
...
backend/requirements.txt
浏览文件 @
dde80025
...
...
@@ -7,3 +7,5 @@ requests==2.31.0
pycryptodome==3.19.0
apscheduler==3.10.4
aiohttp==3.9.1
PyJWT==2.10.1
bcrypt
\ No newline at end of file
frontend/Dockerfile
浏览文件 @
dde80025
# Frontend — build React + serve with Nginx
FROM
node:20-alpine AS build
FROM
docker.1ms.run/
node:20-alpine AS build
WORKDIR
/app
COPY
package.json package-lock.json ./
...
...
@@ -7,7 +7,7 @@ RUN npm ci --production=false
COPY
. .
RUN
npm run build
FROM
nginx:alpine
FROM
docker.1ms.run/
nginx:alpine
COPY
--from=build /app/dist /usr/share/nginx/html
COPY
nginx/nginx.conf /etc/nginx/conf.d/default.conf
...
...
nginx/nginx.conf
→
frontend/
nginx/nginx.conf
浏览文件 @
dde80025
...
...
@@ -13,7 +13,7 @@ server {
# Backend API proxy
location
/api/
{
proxy_pass
http://
law_order_backend
:8080
;
proxy_pass
http://
192.168.0.143
:8080
;
proxy_set_header
Host
$host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
...
...
@@ -23,7 +23,7 @@ server {
# WebSocket support (future SSE/log streaming)
location
/ws/
{
proxy_pass
http://
law_order_backend
:8080
;
proxy_pass
http://
192.168.0.143
:8080
;
proxy_http_version
1
.1
;
proxy_set_header
Upgrade
$http_upgrade
;
proxy_set_header
Connection
"upgrade"
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论