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
8472f7f4
Commit
8472f7f4
authored
Aug 29, 2025
by
luoqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:update
parent
f5609a93
Pipeline
#3218
failed with stage
in 2 minutes 8 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
3 deletions
+25
-3
.env
+1
-1
Dockerfile
+1
-1
docker-compose.yml
+1
-1
nginx.conf
+22
-0
No files found.
.env
View file @
8472f7f4
# 前端环境变量配置
# API 服务地址 - 指向外部API服务
VITE_API_BASE_URL=http
s://tools-performance-score.jarvismedical.asia
VITE_API_BASE_URL=http
://localhost:8000
# 应用配置
VITE_APP_TITLE=绩效计分系统
...
...
Dockerfile
View file @
8472f7f4
...
...
@@ -12,7 +12,7 @@ RUN npm ci --silent || npm install --legacy-peer-deps
COPY
. .
# 设置构建时环境变量
ARG
VITE_API_BASE_URL
=https://tools-performance-score.jarvismedical.asia
ARG
VITE_API_BASE_URL
ENV
VITE_API_BASE_URL=$VITE_API_BASE_URL
# 构建应用
...
...
docker-compose.yml
View file @
8472f7f4
...
...
@@ -56,7 +56,7 @@ services:
context
:
.
dockerfile
:
Dockerfile
args
:
VITE_API_BASE_URL
:
${VITE_API_BASE_URL
:-https://tools-performance-score.jarvismedical.asia
}
VITE_API_BASE_URL
:
${VITE_API_BASE_URL}
container_name
:
performance_frontend
ports
:
-
"
4001:80"
...
...
nginx.conf
View file @
8472f7f4
...
...
@@ -7,6 +7,28 @@ server {
root
/usr/share/nginx/html
;
index
index.html
;
# API 代理到后端服务(仅当使用相对路径 /api 时)
location
/api/
{
proxy_pass
http://api:8000/
;
proxy_set_header
Host
$host
;
proxy_set_header
X-Real-IP
$remote_addr
;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-Proto
$scheme
;
# CORS 头部
add_header
Access-Control-Allow-Origin
*
;
add_header
Access-Control-Allow-Methods
"GET,
POST,
PUT,
DELETE,
OPTIONS"
;
add_header
Access-Control-Allow-Headers
"Content-Type,
Authorization"
;
# 处理 OPTIONS 预检请求
if
(
$request_method
=
'OPTIONS')
{
add_header
Access-Control-Allow-Origin
*
;
add_header
Access-Control-Allow-Methods
"GET,
POST,
PUT,
DELETE,
OPTIONS"
;
add_header
Access-Control-Allow-Headers
"Content-Type,
Authorization"
;
return
204
;
}
}
# 处理前端路由:不存在的路径回退 index.html
location
/
{
try_files
$uri
$uri
/
/index.html
;
...
...
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