5 changed files with 125 additions and 47 deletions
@ -1,10 +1,10 @@ |
|||||||
FROM nginx |
FROM nginx |
||||||
|
|
||||||
COPY ./dist /data |
COPY ../dist /data |
||||||
COPY ./secret /secret |
COPY ../secret /secret |
||||||
|
|
||||||
RUN rm /etc/nginx/conf.d/default.conf |
RUN rm /etc/nginx/conf.d/default.conf |
||||||
|
|
||||||
ADD kicc-ui.conf /etc/nginx/conf.d/ |
ADD default.conf /etc/nginx/conf.d/ |
||||||
|
|
||||||
RUN /bin/bash -c 'echo init ok' |
RUN /bin/bash -c 'echo init ok' |
@ -0,0 +1,53 @@ |
|||||||
|
# 如果没有显式声明 default server 则第一个 server 会被隐式的设为 default server |
||||||
|
server { |
||||||
|
# 自定义访问端口 |
||||||
|
listen 80; |
||||||
|
client_max_body_size 100M; |
||||||
|
|
||||||
|
# 服务名称 |
||||||
|
server_name localhost; |
||||||
|
|
||||||
|
# 代理访问根地址 |
||||||
|
root /data; |
||||||
|
|
||||||
|
#设置转发请求头参数 |
||||||
|
proxy_connect_timeout 15s; |
||||||
|
proxy_send_timeout 15s; |
||||||
|
proxy_read_timeout 15s; |
||||||
|
proxy_set_header Host $http_host; |
||||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||||
|
|
||||||
|
# 代理访问kicc-ui地址 |
||||||
|
location / { |
||||||
|
try_files $uri $uri/ /index.html; |
||||||
|
error_page 405 =200 https://$host$request_uri; |
||||||
|
} |
||||||
|
|
||||||
|
# 代理访问后端微服务网关地址 |
||||||
|
location ^~/prod-api/ { |
||||||
|
rewrite ^/prod-api/(.*)$ /$1 break; |
||||||
|
proxy_pass http://kicc-gateway:9999; |
||||||
|
} |
||||||
|
|
||||||
|
# 代理访问后端上传地址 |
||||||
|
location ^~/prod-upload { |
||||||
|
rewrite ^/prod-upload(.*)$ /system_proxy/system/file/upload break; |
||||||
|
proxy_pass http://kicc-gateway:9999; |
||||||
|
} |
||||||
|
|
||||||
|
# 代理访问后端文件在线预览地址 |
||||||
|
location ^~/prod-preview/ { |
||||||
|
proxy_pass http://kicc-fileview:8012/; |
||||||
|
} |
||||||
|
|
||||||
|
# 代理访问后端微服务报表地址,绕过https不能内嵌http |
||||||
|
location ^~/ureport/ { |
||||||
|
proxy_pass http://kicc-gateway:9999/report_proxy/ureport/; |
||||||
|
} |
||||||
|
|
||||||
|
# 代理访问后端微服务大屏设计器地址(直接代理线上) |
||||||
|
location ^~/bigscreen/ { |
||||||
|
proxy_pass http://kicc.kanglailab.com:8085/; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
FROM nginx |
||||||
|
|
||||||
|
COPY ../dist /data |
||||||
|
COPY ../secret /secret |
||||||
|
|
||||||
|
RUN rm /etc/nginx/conf.d/default.conf |
||||||
|
|
||||||
|
ADD default.conf /etc/nginx/conf.d/ |
||||||
|
|
||||||
|
RUN /bin/bash -c 'echo init ok' |
Loading…
Reference in new issue