File tree Expand file tree Collapse file tree 9 files changed +245
-269
lines changed
Expand file tree Collapse file tree 9 files changed +245
-269
lines changed Original file line number Diff line number Diff line change 1+ #
2+ # - 功能: 构建JavaScriptCollection镜像
3+ # - 用法: docker build -f Dockerfile --build-arg APP_VERSION=0.0.1 -t JavaScriptCollection-0.0.1 .
4+ #
15# # 注意:vite构建需要支持node14以上,安装node16较为稳妥
26FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:16.12.0-alpine AS build_base
3- LABEL version="Beta1.0" description="JavaScriptCollection文档合集、博客"
4- LABEL author="【Github&公众号】:Rong姐姐好可爱" email="fairy@2925.com"
7+
58RUN mkdir -p /apps
69# # 确定工作空间 /apps
710WORKDIR /apps
@@ -10,14 +13,10 @@ COPY . .
1013# # 安装依赖
1114RUN npm i pnpm@6 -g && pnpm i -D && pnpm build
1215
13- # 设置部署镜像
1416FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.23.0-alpine
15-
17+ ARG APP_VERSION
18+ LABEL version=$APP_VERSION description="JavaScriptCollection文档合集、博客"
19+ LABEL author="【Github&公众号】:Rong姐姐好可爱" email="fairy@2925.com"
1620# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数
1721COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
18- # # 配置文件
1922COPY nginx.conf /etc/nginx/
20-
21- # # 采用默认80端口
22- # EXPOSE 7100
23- # CMD ["nginx", "-g", "daemon off;"]
Original file line number Diff line number Diff line change 1+ #
2+ # - 功能: 快速构建JavaScriptCollection镜像
3+ # - 用法: docker build -f Faster.Dockerfile --build-arg APP_VERSION=0.0.1 -t JavaScriptCollection-0.0.1 .
4+ #
5+
6+ FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:1.23.0-alpine
7+ ARG APP_VERSION
8+ LABEL version=$APP_VERSION description="JavaScriptCollection文档合集、博客"
9+ LABEL author="【Github&公众号】:Rong姐姐好可爱" email="fairy_vip@2925.com"
10+
11+ # 将dist文件中的内容复制到 /usr/share/nginx/html/
12+ COPY ./docs/.vuepress/dist/ /usr/share/nginx/html/
13+ COPY nginx.conf /etc/nginx/
14+
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ export default hopeTheme({
5252 // 设置页脚
5353 displayFooter :true ,
5454 footer :FOOTER_HTML_INFO ,
55+ copyright :false ,
5556
5657 // 主题色选择器
5758 themeColor : {
@@ -62,7 +63,7 @@ export default hopeTheme({
6263 } ,
6364
6465 plugins : {
65- copyright :true ,
66+ copyright :false ,
6667 // 开启博客功能
6768 blog :true ,
6869 // 代码块
Original file line number Diff line number Diff line change 11---
22home : true
3- heroHeight : 200
43heroAlt : 屈身守份 以待天时
54heroText : JavaScriptCollection
65tagline : 理论+实战模式下的硬核全栈学习合集,内容持续更新...
7-
8-
96actions :
107 - text : 快速开始 →
118 link : /quick-start/
@@ -34,7 +31,7 @@ features:
3431
3532---
3633
37- <BiliBili bvid =" BV1U4411A7MM " />
34+ <BiliBili bvid =" BV1rd4y1V7tB " />
3835
3936
4037### 本地浏览【推荐】
Original file line number Diff line number Diff line change 33 "version" : " 0.0.1" ,
44 "description" : " 一本有趣的JavaScript合集" ,
55 "scripts" : {
6- "clean" : " find . -name \" node_modules\" -type d -exec rm -rf '{}' +" ,
6+ "clean" : " find . -name \" node_modules\" -type d -exec rm -rf '{}' + && rm -rf docs/.vuepress/dist " ,
77 "dev" : " vuepress dev docs" ,
88 "build" : " vuepress build docs" ,
9- "build-image" : " bash scripts/build_image.sh $npm_package_version" ,
9+ "image" : " bash scripts/build_image.sh $npm_package_version" ,
10+ "faster-image" : " bash scripts/build_image.sh $npm_package_version faster" ,
1011 "github" : " bash scripts/deploy.bash github"
1112 },
1213 "devDependencies" : {
13- "vue" : " ^3.2.45" ,
14+ "@vuepress/client" : " 2.0.0-beta.60" ,
15+ "vue" : " ^3.2.47" ,
1416 "vuepress" : " 2.0.0-beta.60" ,
1517 "vuepress-plugin-search-pro" : " ^2.0.0-beta.172" ,
16- "vuepress-theme-hope" : " ^2.0.0-beta.171" ,
17- "@vuepress/client" : " 2.0.0-beta.60"
18+ "vuepress-theme-hope" : " ^2.0.0-beta.172"
1819 }
1920}
You can’t perform that action at this time.
0 commit comments