Vue deployment front-end project
First, download the project to the local https://github.com/macrozheng/mall-admin-web
二、npm install
Third, modify api configuration, instead of the background you want to deploy the next item ip: port
Fourth, the compiler package
V. deployment
- Jiang dist folder compressed into dist.tar.gz
- Install Remote Copy Tool yum -y install lrzsz
- Nginx into the folder: cd mydata / nginx /
- Execute the copy command to copy the file to the local dist folder nginx: rz
- Decompression: tar -zxvf dist.tar.gz
- Delete html folder: rm -rf html
- The dist folder renamed html: mv dist html
Sixth, restart nginx instance
docker restart nginx
Seven, because nginx default port 80 http monitor, so direct access to the machine ip will be able to jump to our web page, but still need to open port 80 Ali cloud server: