通用mybatis-plus查询封装(QueryGenerator)
    1. nginx.conf
 
worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/json;
    sendfile        on;
    
    keepalive_timeout  65;
    server {
        listen       18080;
        # 指定前端项目所在的位置
        location / {
            root /usr/share/nginx/html/hmall-portal;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        location /api {
            rewrite /api/(.*)  /$1 break;
            proxy_pass http://hm:8080;
        }
    }
    server {
        listen       18081;
        # 指定前端项目所在的位置
        location / {
            root /usr/share/nginx/html/hmall-admin;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        location /api {
            rewrite /api/(.*)  /$1 break;
            proxy_pass http://hm:8080;
        }
    }
}
 
2. 运行Nginx镜像
 
docker run -d --name nginx -p 18080:18080 -p 18081:18081 -v /root/docker/nginx/html:/usr/share/nginx/html -v /root/docker/nginx/nginx.conf:/etc/nginx/nginx.conf --network hw nginx