Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
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
Chao Sun
CFFP-HB
Commits
8e1c2dd6
Commit
8e1c2dd6
authored
Jul 22, 2025
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置
parent
5b8905e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
Dockerfile
+14
-0
nginx.conf
+24
-0
No files found.
Dockerfile
0 → 100644
View file @
8e1c2dd6
# 构建阶段
FROM
node:16-alpine as build-stage
WORKDIR
/app
COPY
package*.json ./
RUN
npm install
COPY
. .
RUN
npm run build:h5
# 生产阶段
FROM
nginx:stable-alpine
COPY
--from=build-stage /app/dist /usr/share/nginx/html
COPY
nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE
8333
CMD
["nginx", "-g", "daemon off;"]
nginx.conf
0 → 100644
View file @
8e1c2dd6
server
{
listen
8333
;
server_name
localhost
;
location
/
{
root
/usr/share/nginx/html
;
index
index.html
;
try_files
$uri
$uri
/
/index.html
;
# 处理Vue路由history模式
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'
'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'
;
add_header
'Access-Control-Max-Age'
1728000
;
add_header
'Content-Type'
'text/plain
charset=UTF-8'
;
add_header
'Content-Length'
0
;
return
204
;
}
limit_except
GET
POST
PUT
DELETE
OPTIONS
{
deny
all
;
}
}
}
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