-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6bce40c
commit 4717b2f
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
sendfile on; | ||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 80; | ||
server_name localhost; | ||
|
||
location / { | ||
root /home/ruoyi/projects/ruoyi-ui; | ||
try_files $uri $uri/ /index.html; | ||
index index.html index.htm; | ||
} | ||
|
||
location /prod-api/{ | ||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header REMOTE-HOST $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_pass http://ruoyi-gateway:8080/; | ||
} | ||
|
||
# 避免actuator暴露 | ||
if ($request_uri ~ "/actuator") { | ||
return 403; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root html; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 基础镜像 | ||
FROM nginx | ||
# author | ||
MAINTAINER canghe | ||
|
||
# 挂载目录 | ||
VOLUME /home/pmhub/projects/pmhub-ui | ||
# 创建目录 | ||
RUN mkdir -p /home/pmhub/projects/pmhub-ui | ||
# 指定路径 | ||
WORKDIR /home/pmhub/projects/pmhub-ui | ||
# 复制conf文件到路径 | ||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf | ||
# 复制html文件到路径 | ||
COPY ./html/dist /home/pmhub/projects/pmhub-ui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
���ǰ��pmhub-ui�����õľ�̬�ļ�������nginx������ʡ� |