Skip to content

Commit 875a055

Browse files
committed
refactor(docs):添加自动化脚本,打通发版流程
- 建立底稿文件,移动异常md文档 - 新增脚本,打通发版流程 - 优化docker镜像源
1 parent 521eeff commit 875a055

File tree

82 files changed

+312
-9922
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+312
-9922
lines changed

Dockerfile

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
1-
# 安装node 作为基础构建镜像
2-
# FROM node:12.6.0-alpine AS build_base
3-
FROM node AS build_base
4-
5-
# 镜像标签
6-
LABEL version="Beta1.0"
7-
LABEL description="JavaScriptCollection文档合集、博客"
8-
# 作者信息
9-
LABEL author="【Github&公众号】:Rong姐姐好可爱"
10-
LABEL email="fairy@2925.com"
1+
## 注意:vite构建需要支持node14以上,安装node16较为稳妥
2+
FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:16.12.0-alpine AS build_base
113

4+
LABEL version="Beta1.0" description="JavaScriptCollection文档合集、博客"
5+
LABEL author="【Github&公众号】:Rong姐姐好可爱" email="fairy@2925.com"
6+
RUN mkdir -p /apps
127
## 确定工作空间 /apps
138
COPY . /apps
149
WORKDIR /apps
1510

1611
## 安装依赖
17-
RUN npm install && npm run build
12+
RUN npm ci --registry https://registry.npmmirror.com && npm run build
1813

1914
# 设置部署镜像
20-
FROM nginx
15+
FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:latest
2116

2217
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 注意:--from参数
2318
COPY --from=build_base /apps/docs/.vuepress/dist/ /usr/share/nginx/html/
2419

25-
2620
## 暴露端口
2721
EXPOSE 80

0 commit comments

Comments
 (0)