File tree Expand file tree Collapse file tree 3 files changed +59
-12
lines changed
Expand file tree Collapse file tree 3 files changed +59
-12
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,6 @@ FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:latest
1717# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数
1818COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
1919
20- # # 暴露端口
21- EXPOSE 80
20+ COPY nginx.conf /etc/nginx/
21+ EXPOSE 7100
22+ CMD ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change 1+ # 参考:https://www.likecs.com/ask-1256888.html
2+ user root ;
3+ worker_processes auto;
4+ error_log /var/log/nginx/error.log warn;
5+ events {
6+ worker_connections 1024 ;
7+ }
8+ http {
9+ include /etc/nginx/mime.types ;
10+ default_type application/octet-stream ;
11+ sendfile off;
12+ access_log off;
13+ keepalive_timeout 3000 ;
14+ server {
15+ listen 7100 ;
16+ server_name localhost;
17+ #charset koi8-r;
18+ access_log /var/log/nginx/access.log main;
19+ error_log /var/log/nginx/error.log error;
20+ ## 静态资源代理
21+ location / {
22+ gzip on; #开启或关闭gzip on off
23+ gzip_disable "msie6" ; #不使用gzip IE6
24+ gzip_min_length 100k ; #gzip 压缩最小文件大小,超出进行压缩(自行调节)
25+ gzip_buffers 4 16k ; #buffer 不用修改
26+ gzip_comp_level 8; #压缩级别:1-10 ,数字越大压缩的越好,时间也越长
27+ gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; # 压缩文件类型
28+ # root 根目录,默认nginx镜像的html文件夹,可以指定其他
29+ root /usr/share/nginx/html;
30+ index index .html index .htm;
31+ # 如果vue-router使用的是history模式,需要设置这个
32+ try_files $uri $uri / /index .html;
33+ }
34+ ## 错误页面
35+ error_page 404 /404 .html;
36+ error_page 500 502 503 504 /50x .html;
37+ location = /50x .html {
38+ root /usr/share/nginx/html;
39+ }
40+ }
41+ }
42+
Original file line number Diff line number Diff line change 99 # @LastEditTime: 2022-04-18 23:35:15
1010# ##
1111
12- # abort on errors
12+ commitInfo=${1}
13+
1314set -e
1415
15- # build
16+ # 进入上级目录,并编译
1617npm run build
1718
18- # navigate into the build output directory
19+ # # 切换到dist文件目录
1920cd docs/.vuepress/dist
2021
21- # if you are deploying to a custom domain
22- # echo 'www.example.com' > CNAME
23-
2422git init
2523git add -A
26- git commit -m ' JavaScriptCollection Init'
24+
25+ # # 如果没有输入commit信息,则采用默认
26+ if [ " ${commitInfo} " -eq " " ]; then
27+ commitInfo=" JavaScriptCollection Init"
28+ fi
29+
30+ git commit -m " refactor:${commitInfo} "
2731
2832
2933# # 配置个人信息
30- git config user.name " mmdapl "
31- git config user.email " fairy @2925.com"
34+ git config user.name " 喜欢吃芝士葡萄的妹妹 "
35+ git config user.email " fairy0115 @2925.com"
3236
3337# if you are deploying to https://<USERNAME>.github.io
3438# git push -f git@github.com:<USERNAME>/<USERNAME>.github.io.git master
3539
3640# if you are deploying to https://<USERNAME>.github.io/<REPO>
37- git push -f https://github.com/mmdapl/JavaScriptCollection.git master:gh- pages
41+ git push -f https://github.com/mmdapl/JavaScriptCollection.git master:pages/github
3842
3943
4044cd -
You can’t perform that action at this time.
0 commit comments