Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance-score
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tools
performance-score
Commits
f5609a93
Commit
f5609a93
authored
Aug 29, 2025
by
luoqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:update
parent
4e323670
Pipeline
#3217
failed with stage
in 2 minutes 8 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
8 deletions
+14
-8
.env
+2
-2
Dockerfile
+1
-1
backend/config.py
+1
-3
backend/main.py
+9
-1
docker-compose.yml
+1
-1
No files found.
.env
View file @
f5609a93
# 前端环境变量配置
# 前端环境变量配置
# API 服务地址 -
直接指向后端
服务
# API 服务地址 -
指向外部API
服务
VITE_API_BASE_URL=http
://localhost:8000
VITE_API_BASE_URL=http
s://tools-performance-score.jarvismedical.asia
# 应用配置
# 应用配置
VITE_APP_TITLE=绩效计分系统
VITE_APP_TITLE=绩效计分系统
...
...
Dockerfile
View file @
f5609a93
...
@@ -12,7 +12,7 @@ RUN npm ci --silent || npm install --legacy-peer-deps
...
@@ -12,7 +12,7 @@ RUN npm ci --silent || npm install --legacy-peer-deps
COPY
. .
COPY
. .
# 设置构建时环境变量
# 设置构建时环境变量
ARG
VITE_API_BASE_URL=http
://localhost:8000
ARG
VITE_API_BASE_URL=http
s://tools-performance-score.jarvismedical.asia
ENV
VITE_API_BASE_URL=$VITE_API_BASE_URL
ENV
VITE_API_BASE_URL=$VITE_API_BASE_URL
# 构建应用
# 构建应用
...
...
backend/config.py
View file @
f5609a93
...
@@ -37,9 +37,7 @@ class Settings(BaseSettings):
...
@@ -37,9 +37,7 @@ class Settings(BaseSettings):
MAX_IMAGES_PER_INSTITUTION
:
int
=
10
MAX_IMAGES_PER_INSTITUTION
:
int
=
10
# CORS 配置
# CORS 配置
CORS_ORIGINS
:
List
[
str
]
=
[
CORS_ORIGINS
:
str
=
"*"
# 简化为字符串格式,避免 JSON 解析问题
"*"
,
# 开发环境允许所有来源
]
# WebSocket 配置
# WebSocket 配置
WEBSOCKET_HEARTBEAT_INTERVAL
:
int
=
30
WEBSOCKET_HEARTBEAT_INTERVAL
:
int
=
30
...
...
backend/main.py
View file @
f5609a93
...
@@ -92,9 +92,17 @@ app = FastAPI(
...
@@ -92,9 +92,17 @@ app = FastAPI(
)
)
# 配置 CORS 中间件
# 配置 CORS 中间件
# 处理 CORS_ORIGINS 配置,支持字符串和列表格式
cors_origins
=
settings
.
CORS_ORIGINS
if
isinstance
(
cors_origins
,
str
):
if
cors_origins
==
"*"
:
cors_origins
=
[
"*"
]
else
:
cors_origins
=
[
cors_origins
]
app
.
add_middleware
(
app
.
add_middleware
(
CORSMiddleware
,
CORSMiddleware
,
allow_origins
=
settings
.
CORS_ORIGINS
,
allow_origins
=
cors_origins
,
allow_credentials
=
True
,
allow_credentials
=
True
,
allow_methods
=
[
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
,
"OPTIONS"
],
allow_methods
=
[
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
,
"OPTIONS"
],
allow_headers
=
[
"*"
],
allow_headers
=
[
"*"
],
...
...
docker-compose.yml
View file @
f5609a93
...
@@ -56,7 +56,7 @@ services:
...
@@ -56,7 +56,7 @@ services:
context
:
.
context
:
.
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
args
:
args
:
-
VITE_API_BASE_URL=http://localhost:8000
VITE_API_BASE_URL
:
${VITE_API_BASE_URL:-https://tools-performance-score.jarvismedical.asia}
container_name
:
performance_frontend
container_name
:
performance_frontend
ports
:
ports
:
-
"
4001:80"
-
"
4001:80"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment