mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
测试流水线docker构建镜像
This commit is contained in:
@@ -49,8 +49,10 @@ COPY ./emqx4.0/emqx_web_hook.conf /etc/emqx/plugins/emqx_web_hook.conf
|
|||||||
COPY ./emqx4.0/loaded_plugins /var/lib/emqx/loaded_plugins
|
COPY ./emqx4.0/loaded_plugins /var/lib/emqx/loaded_plugins
|
||||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||||
# 拷贝前后端压缩文件到容器,容器内解压后删除
|
# 拷贝前后端压缩文件到容器,容器内解压后删除
|
||||||
COPY ./wumei-smart.tar /var/
|
# COPY ./wumei-smart.tar /var/
|
||||||
RUN cd /var && tar -xvf wumei-smart.tar && rm wumei-smart.tar
|
# RUN cd /var && tar -xvf wumei-smart.tar && rm wumei-smart.tar
|
||||||
|
|
||||||
|
# 解压前端和后端文件并放置到对应位置
|
||||||
|
|
||||||
# 启动脚本
|
# 启动脚本
|
||||||
COPY docker-entrypoint.sh /
|
COPY docker-entrypoint.sh /
|
||||||
|
|||||||
61
docker/local_build/Dockerfile
Normal file
61
docker/local_build/Dockerfile
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
FROM openjdk:8u322-jre-slim-buster
|
||||||
|
|
||||||
|
ENV VERSION 1.1
|
||||||
|
ENV AUTHOR kerwincui
|
||||||
|
ENV INFO wumei smart open source living iot platform
|
||||||
|
ENV SERVERS nginx:1.14.2, redis-server:5.0.14, emqx:4.0, openjdk:8u322-jre-slim-buster
|
||||||
|
|
||||||
|
# mysql环境变量
|
||||||
|
ENV DB_HOST localhost
|
||||||
|
ENV DB_NAME wumei
|
||||||
|
ENV DB_USER root
|
||||||
|
ENV DB_PASSWORD admin
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
# 安装网络工具和设置时区
|
||||||
|
apt-get install wget -y --no-install-recommends && \
|
||||||
|
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
||||||
|
# 更换国内源
|
||||||
|
wget http://qiniu.xiwen.online/Debian10.list && \
|
||||||
|
mv Debian10.list /etc/apt/sources.list && \
|
||||||
|
apt update && apt upgrade -y && \
|
||||||
|
# 安装压缩工具
|
||||||
|
apt install zip -y && \
|
||||||
|
# 安装nginx和redis
|
||||||
|
apt-get install nginx -y --no-install-recommends && \
|
||||||
|
apt-get install redis-server -y --no-install-recommends && \
|
||||||
|
# 安装 emqx
|
||||||
|
apt update && apt install -y \
|
||||||
|
apt-transport-https \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gnupg-agent \
|
||||||
|
software-properties-common && \
|
||||||
|
curl -fsSL https://repos.emqx.io/gpg.pub | apt-key add - && \
|
||||||
|
add-apt-repository \
|
||||||
|
"deb [arch=amd64] https://repos.emqx.io/emqx-ce/deb/ubuntu/ \
|
||||||
|
./bionic \
|
||||||
|
stable" && \
|
||||||
|
apt update && \
|
||||||
|
apt install emqx=4.0.0 -y --no-install-recommends && \
|
||||||
|
# 修改redis配置
|
||||||
|
sed -i "s/# requirepass foobared/requirepass wumei-smart/g" /etc/redis/redis.conf && \
|
||||||
|
sed -i "s/bind 127.0.0.1/# bind 127.0.0.1/g" /etc/redis/redis.conf
|
||||||
|
|
||||||
|
# 复制emqx和Nginx的配置文件
|
||||||
|
COPY ./emqx4.0/emqx.conf /etc/emqx/emqx.conf
|
||||||
|
COPY ./emqx4.0/emqx_auth_http.conf /etc/emqx/plugins/emqx_auth_http.conf
|
||||||
|
COPY ./emqx4.0/emqx_web_hook.conf /etc/emqx/plugins/emqx_web_hook.conf
|
||||||
|
COPY ./emqx4.0/loaded_plugins /var/lib/emqx/loaded_plugins
|
||||||
|
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||||
|
# 拷贝前后端压缩文件到容器,容器内解压后删除
|
||||||
|
COPY ./wumei-smart.tar /var/
|
||||||
|
RUN cd /var && tar -xvf wumei-smart.tar && rm wumei-smart.tar
|
||||||
|
|
||||||
|
# 启动脚本
|
||||||
|
COPY docker-entrypoint.sh /
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
|
|
||||||
|
# 映射端口
|
||||||
|
EXPOSE 80 1883 8083
|
||||||
|
|
||||||
48
docker/local_build/description.txt
Normal file
48
docker/local_build/description.txt
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
# 服务启动
|
||||||
|
service nginx start
|
||||||
|
service redis-server start
|
||||||
|
service mysql start
|
||||||
|
emqx start
|
||||||
|
java -jar /var/wumei-smart/app.jar
|
||||||
|
|
||||||
|
# 镜像构建
|
||||||
|
docker build -t wumei-smart:1.0 .
|
||||||
|
# 复制文件到容器
|
||||||
|
docker cp wumei-smart/* container:/var/wumei-smart/
|
||||||
|
# 镜像导出导入
|
||||||
|
docker export container| docker import - kerwincui/wumei-smart:1.0
|
||||||
|
# 镜像推送
|
||||||
|
阿里云镜像:registry.cn-chengdu.aliyuncs.com/kerwincui/wumei-smart:1.0
|
||||||
|
docker tag wumei-smart kerwincui/wumei-smart:1.0
|
||||||
|
docker push kerwinci/wumei-smart:1.0
|
||||||
|
|
||||||
|
# 容器运行
|
||||||
|
docker run \
|
||||||
|
--name wumei-smart \
|
||||||
|
--env DB_HOST=wumei.live:3306 \
|
||||||
|
--env DB_NAME=wumei-smart \
|
||||||
|
--env DB_USER=root \
|
||||||
|
--env DB_PASSWORD=wumei-smart \
|
||||||
|
--publish 80:80 \
|
||||||
|
--publish 1883:1883 \
|
||||||
|
--publish 8083:8083 \
|
||||||
|
--volume /var/wumei-smart/java/uploadPath:/var/wumei-smart/java/uploadPath \
|
||||||
|
--restart unless-stopped \
|
||||||
|
--detach \
|
||||||
|
kerwincui/wumei-smart:1.1
|
||||||
|
|
||||||
|
--publish 18083:18083 \
|
||||||
|
--publish 8084:8084 \
|
||||||
|
--publish 8883:8883 \
|
||||||
|
--publish 8081:8081 \
|
||||||
|
--publish 6379:6379 \
|
||||||
|
--publish 8080:8080 \
|
||||||
|
|
||||||
|
--volume /var/wumei-smart/java/logs:/var/wumei-smart/java/logs \
|
||||||
|
--volume /var/wumei-smart/nginx/nginx.conf:/etc/nginx/nginx.conf \
|
||||||
|
--volume /var/wumei-smart/nginx/error.log:/var/log/nginx/error.log \
|
||||||
|
--volume /var/wumei-smart/redis/redis.conf:/etc/redis/redis.conf \
|
||||||
|
--volume /var/wumei-smart/redis/redis-server.log:/var/log/redis/redis-server.log \
|
||||||
|
--volume /var/wumei-smart/emqx/emqx.conf:/etc/emqx/emqx.conf \
|
||||||
|
--volume /var/wumei-smart/emqx/log:/var/log/emqx \
|
||||||
|
|
||||||
32
docker/local_build/docker-entrypoint.sh
Normal file
32
docker/local_build/docker-entrypoint.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# start service
|
||||||
|
startTime=$(date "+%Y-%m-%d %H:%M:%S")
|
||||||
|
echo $startTime : wumei-smart is starting, please waiting ...
|
||||||
|
|
||||||
|
# 提取jar包配置文件
|
||||||
|
cd /var/wumei-smart/java
|
||||||
|
unzip app.jar BOOT-INF/classes/application-druid.yml
|
||||||
|
# 修改mysql配置
|
||||||
|
sed -i "s/{DB_HOST}/$DB_HOST/g" BOOT-INF/classes/application-druid.yml
|
||||||
|
sed -i "s/{DB_NAME}/$DB_NAME/g" BOOT-INF/classes/application-druid.yml
|
||||||
|
sed -i "s/{DB_USER}/$DB_USER/g" BOOT-INF/classes/application-druid.yml
|
||||||
|
sed -i "s/{DB_PASSWORD}/$DB_PASSWORD/g" BOOT-INF/classes/application-druid.yml
|
||||||
|
# 配置文件写入jar包,并删除提取的配置
|
||||||
|
zip app.jar BOOT-INF/classes/application-druid.yml
|
||||||
|
rm -rf BOOT-INF
|
||||||
|
|
||||||
|
service nginx start
|
||||||
|
service redis-server start
|
||||||
|
emqx start
|
||||||
|
java -jar /var/wumei-smart/java/app.jar
|
||||||
|
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
time=$(date "+%Y-%m-%d %H:%M:%S")
|
||||||
|
echo $time : wumei-smart is running...
|
||||||
|
sleep 3600
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
2061
docker/local_build/emqx4.0/emqx.conf
Normal file
2061
docker/local_build/emqx4.0/emqx.conf
Normal file
File diff suppressed because it is too large
Load Diff
133
docker/local_build/emqx4.0/emqx_auth_http.conf
Normal file
133
docker/local_build/emqx4.0/emqx_auth_http.conf
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
##--------------------------------------------------------------------
|
||||||
|
## HTTP Auth/ACL Plugin
|
||||||
|
##--------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
##------------------------------------------------------------------------------
|
||||||
|
## SSL options
|
||||||
|
|
||||||
|
## Path to the file containing PEM-encoded CA certificates. The CA certificates
|
||||||
|
## are used during server authentication and when building the client certificate chain.
|
||||||
|
##
|
||||||
|
## Value: File
|
||||||
|
## auth.http.ssl.cacertfile = /etc/emqx/certs/ca.pem
|
||||||
|
|
||||||
|
## The path to a file containing the client's certificate.
|
||||||
|
##
|
||||||
|
## Value: File
|
||||||
|
## auth.http.ssl.certfile = /etc/emqx/certs/client-cert.pem
|
||||||
|
|
||||||
|
## Path to a file containing the client's private PEM-encoded key.
|
||||||
|
##
|
||||||
|
## Value: File
|
||||||
|
## auth.http.ssl.keyfile = /etc/emqx/certs/client-key.pem
|
||||||
|
|
||||||
|
##--------------------------------------------------------------------
|
||||||
|
## HTTP Request Headers
|
||||||
|
##
|
||||||
|
## Example: auth.http.header.Accept-Encoding = *
|
||||||
|
##
|
||||||
|
## Value: String
|
||||||
|
## auth.http.header.Accept = */*
|
||||||
|
|
||||||
|
##--------------------------------------------------------------------
|
||||||
|
## Authentication request.
|
||||||
|
##
|
||||||
|
## Variables:
|
||||||
|
## - %u: username
|
||||||
|
## - %c: clientid
|
||||||
|
## - %a: ipaddress
|
||||||
|
## - %r: protocol
|
||||||
|
## - %P: password
|
||||||
|
## - %p: sockport of server accepted
|
||||||
|
## - %C: common name of client TLS cert
|
||||||
|
## - %d: subject of client TLS cert
|
||||||
|
##
|
||||||
|
## Value: URL
|
||||||
|
auth.http.auth_req = http://localhost:8080/iot/tool/mqtt/auth
|
||||||
|
## Value: post | get | put
|
||||||
|
auth.http.auth_req.method = post
|
||||||
|
## Value: Params
|
||||||
|
auth.http.auth_req.params = clientid=%c,username=%u,password=%P
|
||||||
|
|
||||||
|
##--------------------------------------------------------------------
|
||||||
|
## Superuser request.
|
||||||
|
##
|
||||||
|
## Variables:
|
||||||
|
## - %u: username
|
||||||
|
## - %c: clientid
|
||||||
|
## - %a: ipaddress
|
||||||
|
## - %r: protocol
|
||||||
|
## - %P: password
|
||||||
|
## - %p: sockport of server accepted
|
||||||
|
## - %C: common name of client TLS cert
|
||||||
|
## - %d: subject of client TLS cert
|
||||||
|
##
|
||||||
|
## Value: URL
|
||||||
|
# auth.http.super_req = http://127.0.0.1:8991/mqtt/superuser
|
||||||
|
## Value: post | get | put
|
||||||
|
# auth.http.super_req.method = post
|
||||||
|
## Value: Params
|
||||||
|
# auth.http.super_req.params = clientid=%c,username=%u
|
||||||
|
|
||||||
|
##--------------------------------------------------------------------
|
||||||
|
## ACL request.
|
||||||
|
##
|
||||||
|
## Variables:
|
||||||
|
## - %A: 1 | 2, 1 = sub, 2 = pub
|
||||||
|
## - %u: username
|
||||||
|
## - %c: clientid
|
||||||
|
## - %a: ipaddress
|
||||||
|
## - %r: protocol
|
||||||
|
## - %m: mountpoint
|
||||||
|
## - %t: topic
|
||||||
|
##
|
||||||
|
## Value: URL
|
||||||
|
# auth.http.acl_req = http://127.0.0.1:8991/mqtt/acl
|
||||||
|
## Value: post | get | put
|
||||||
|
# auth.http.acl_req.method = get
|
||||||
|
## Value: Params
|
||||||
|
# auth.http.acl_req.params = access=%A,username=%u,clientid=%c,ipaddr=%a,topic=%t,mountpoint=%m
|
||||||
|
|
||||||
|
##------------------------------------------------------------------------------
|
||||||
|
## Http Reqeust options
|
||||||
|
|
||||||
|
## Time-out time for the http request, 0 is never timeout.
|
||||||
|
##
|
||||||
|
## Value: Duration
|
||||||
|
## -h: hour, e.g. '2h' for 2 hours
|
||||||
|
## -m: minute, e.g. '5m' for 5 minutes
|
||||||
|
## -s: second, e.g. '30s' for 30 seconds
|
||||||
|
##
|
||||||
|
## Default: 0
|
||||||
|
## auth.http.request.timeout = 0
|
||||||
|
|
||||||
|
## Connection time-out time, used during the initial request
|
||||||
|
## when the client is connecting to the server
|
||||||
|
##
|
||||||
|
## Value: Duration
|
||||||
|
##
|
||||||
|
## Default is same with the timeout option
|
||||||
|
## auth.http.request.connect_timout = 0
|
||||||
|
|
||||||
|
## Re-send http reuqest times
|
||||||
|
##
|
||||||
|
## Value: integer
|
||||||
|
##
|
||||||
|
## Default: 3
|
||||||
|
auth.http.request.retry_times = 3
|
||||||
|
|
||||||
|
## The interval for re-sending the http request
|
||||||
|
##
|
||||||
|
## Value: Duration
|
||||||
|
##
|
||||||
|
## Default: 1s
|
||||||
|
auth.http.request.retry_interval = 1s
|
||||||
|
|
||||||
|
## The 'Exponential Backoff' mechanism for re-sending request. The actually
|
||||||
|
## re-send time interval is `interval * backoff ^ times`
|
||||||
|
##
|
||||||
|
## Value: float
|
||||||
|
##
|
||||||
|
## Default: 2.0
|
||||||
|
auth.http.request.retry_backoff = 2.0
|
||||||
22
docker/local_build/emqx4.0/emqx_web_hook.conf
Normal file
22
docker/local_build/emqx4.0/emqx_web_hook.conf
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
web.hook.api.url = http://localhost:8080/iot/tool/mqtt/webhook
|
||||||
|
|
||||||
|
## Encode message payload field
|
||||||
|
##
|
||||||
|
## Value: base64 | base62
|
||||||
|
##
|
||||||
|
## Default: undefined
|
||||||
|
## web.hook.encode_payload = base64
|
||||||
|
|
||||||
|
# web.hook.rule.client.connect.1 = {"action": "on_client_connect"}
|
||||||
|
# web.hook.rule.client.connack.1 = {"action": "on_client_connack"}
|
||||||
|
web.hook.rule.client.connected.1 = {"action": "on_client_connected"}
|
||||||
|
web.hook.rule.client.disconnected.1 = {"action": "on_client_disconnected"}
|
||||||
|
# web.hook.rule.client.subscribe.1 = {"action": "on_client_subscribe"}
|
||||||
|
# web.hook.rule.client.unsubscribe.1 = {"action": "on_client_unsubscribe"}
|
||||||
|
# web.hook.rule.session.subscribed.1 = {"action": "on_session_subscribed"}
|
||||||
|
# web.hook.rule.session.unsubscribed.1 = {"action": "on_session_unsubscribed"}
|
||||||
|
# web.hook.rule.session.terminated.1 = {"action": "on_session_terminated"}
|
||||||
|
# web.hook.rule.message.publish.1 = {"action": "on_message_publish"}
|
||||||
|
# web.hook.rule.message.delivered.1 = {"action": "on_message_delivered"}
|
||||||
|
# web.hook.rule.message.acked.1 = {"action": "on_message_acked"}
|
||||||
8
docker/local_build/emqx4.0/loaded_plugins
Normal file
8
docker/local_build/emqx4.0/loaded_plugins
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{emqx_management,true}.
|
||||||
|
{emqx_recon,true}.
|
||||||
|
{emqx_retainer,true}.
|
||||||
|
{emqx_dashboard,true}.
|
||||||
|
{emqx_rule_engine,true}.
|
||||||
|
{emqx_bridge_mqtt,false}.
|
||||||
|
{emqx_auth_http,true}.
|
||||||
|
{emqx_web_hook,true}.
|
||||||
97
docker/local_build/nginx-ssl.conf
Normal file
97
docker/local_build/nginx-ssl.conf
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length 1k;
|
||||||
|
gzip_buffers 16 64K;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_comp_level 5;
|
||||||
|
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
|
gzip_disable "MSIE [1-6]\.";
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
location / {
|
||||||
|
rewrite ^(.*) https://$server_name$1 permanent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
# 侦听443端口
|
||||||
|
listen 443 ssl;
|
||||||
|
# 定义访问域名
|
||||||
|
server_name localhost;
|
||||||
|
#证书文件名称
|
||||||
|
ssl_certificate domain_bundle.crt;
|
||||||
|
#私钥文件名称
|
||||||
|
ssl_certificate_key domain.key;
|
||||||
|
|
||||||
|
#SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
|
||||||
|
#error_page 404/404.html;
|
||||||
|
#HTTP_TO_HTTPS_START
|
||||||
|
if ($server_port !~ 443){
|
||||||
|
rewrite ^(/.*)$ https://$host$1 permanent;
|
||||||
|
}
|
||||||
|
ssl_session_timeout 10m;
|
||||||
|
#请按照以下协议配置
|
||||||
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||||||
|
#请按照以下套件配置,配置加密套件,写法遵循 openssl 标准。
|
||||||
|
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
|
# web端
|
||||||
|
location / {
|
||||||
|
root /var/wumei-smart/vue;
|
||||||
|
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://localhost:8080/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# emqx接口
|
||||||
|
location /api/v4/{
|
||||||
|
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://localhost:8081/api/v4/;
|
||||||
|
}
|
||||||
|
|
||||||
|
# wss连接
|
||||||
|
location /mqtt {
|
||||||
|
proxy_pass http://localhost:8083/mqtt;
|
||||||
|
proxy_read_timeout 90s;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real_IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-for $remote_addr;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'Upgrade';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
55
docker/local_build/nginx.conf
Normal file
55
docker/local_build/nginx.conf
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
sendfile on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length 1k;
|
||||||
|
gzip_buffers 16 64K;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_comp_level 5;
|
||||||
|
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
|
gzip_disable "MSIE [1-6]\.";
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /var/wumei-smart/vue;
|
||||||
|
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://localhost:8080/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/v4/ {
|
||||||
|
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://localhost:8081/api/v4/;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
0
docker/local_build/wumei-smart/vue/放置vue打包文件内容.txt
Normal file
0
docker/local_build/wumei-smart/vue/放置vue打包文件内容.txt
Normal file
Reference in New Issue
Block a user