Empty your cup so that it can be filled again. —— Bruce Lee

This paper introduces

  • P2 Build a production-level Linux system
  • P3 Learn Docker in half an hour
  • P4 Write Dockerfile and upload DockerHub
  • P5 Docker SpringCloud – compose deployment
  • P6 Build Harbor private server for enterprise mirror
  • P7 K8S & Rancher is coming! Theory & Preparation
  • P8 Rancher2.3 built K8S 1.16 cluster
  • P9 Deploy Spring Cloud to Kubernetes
  • P10 Deploy Vue to Kubernetes config ingress
  • P11 Ha01-rke install Kubernetes cluster
  • P12 HA02-Helm deploys the Rancher cluster

Compile the application

First, install the dependencies. Make any one of them and push it to your harbor private server.

 # decompressionThe tar XVF - node - v12.13.1 - Linux - x64. Tar. Xz# soft links
 ln -s/ root/node - v12.13.1 - Linux - x64 / bin/node/usr /local/bin/node
 ln -s/ root/node - v12.13.1 - Linux - x64 / bin/NPM/usr /local/bin/npm 
 # installation CNPM
 npm install -g cnpm --registry=https://registry.npm.taobao.org
 ln -s/ root/node - v12.13.1 - Linux - x64 / bin/CNPM/usr /local/bin/cnpm  
 # clone source
 git clone https://gitee.com/log4j/pig-ui.git  
 Install dependency packaging
 cnpm install
 npm run build 
Copy the code


server {
    listen 80;
    server_name localhost;
    root /data/;
    location ~* ^/(code|auth|admin|gen|monitor) {
       proxy_pass http://pig-gateway:9999;
       #proxy_set_header Host $http_host;
       proxy_connect_timeout 15s;
       proxy_send_timeout 15s;
       proxy_read_timeout 15s;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }}Copy the code


FROM nginx
COPY dist /data
RUN rm /etc/nginx/conf.d/default.conf
ADD pig-ui.conf /etc/nginx/conf.d/
RUN /bin/bash -c 'echo init ok'
Copy the code

Build the mirror

Docker build. -t Docker push the code

The deployment of the UI

To be perfect…

Form a complete set of data

Please pay attention to wechat (Java-note), message: K8S for supporting information