mirror of
https://github.com/WuKongIM/WuKongIMDocs
synced 2025-05-31 05:24:10 +00:00
feat: 增加部署脚本
This commit is contained in:
parent
23aa39a9e2
commit
01af5510dd
@ -10,6 +10,7 @@ export default defineConfig({
|
|||||||
title: "悟空IM",
|
title: "悟空IM",
|
||||||
description: "IM",
|
description: "IM",
|
||||||
lang: "zh-CN",
|
lang: "zh-CN",
|
||||||
|
ignoreDeadLinks: true,
|
||||||
head: [
|
head: [
|
||||||
["meta", { name: "keywords", content: "IM" }],
|
["meta", { name: "keywords", content: "IM" }],
|
||||||
["link", { rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
|
["link", { rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
|
||||||
@ -48,7 +49,7 @@ export default defineConfig({
|
|||||||
{ icon: 'github', link: 'https://github.com/WuKongIM/WuKongIM' }
|
{ icon: 'github', link: 'https://github.com/WuKongIM/WuKongIM' }
|
||||||
],
|
],
|
||||||
footer: {
|
footer: {
|
||||||
message: `本文档内容版权属于 悟空IM 作者,保留所有权利`,
|
message: `本文档内容版权属于 上海信必达网络科技有限公司,保留所有权利`,
|
||||||
copyright: "Copyright © 2023 | Powered by 悟空IM | ICP备案号:沪ICP备2021032718号-2",
|
copyright: "Copyright © 2023 | Powered by 悟空IM | ICP备案号:沪ICP备2021032718号-2",
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
|
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
FROM node:18.0.0 as builder
|
||||||
|
WORKDIR /app
|
||||||
|
RUN curl -o- -L https://yarnpkg.com/install.sh | bash
|
||||||
|
COPY package.json .
|
||||||
|
COPY yarn.lock .
|
||||||
|
# https://registry.npmjs.org/ https://registry.npm.taobao.org
|
||||||
|
# RUN yarn config set registry https://registry.npm.taobao.org -g
|
||||||
|
# RUN yarn config set disturl https://npm.taobao.org/dist
|
||||||
|
RUN yarn install
|
||||||
|
COPY . .
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
FROM nginx:latest
|
||||||
|
COPY --from=builder /app/docker-entrypoint.sh /docker-entrypoint2.sh
|
||||||
|
COPY --from=builder /app/nginx.conf.template /
|
||||||
|
COPY --from=builder /app/.vitepress/dist /usr/share/nginx/html
|
||||||
|
ENTRYPOINT ["sh", "/docker-entrypoint2.sh"]
|
||||||
|
CMD ["nginx","-g","daemon off;"]
|
6
Makefile
Normal file
6
Makefile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
build:
|
||||||
|
docker build -t wukongimdocs .
|
||||||
|
deploy:
|
||||||
|
docker build -t wukongimdocs .
|
||||||
|
docker tag wukongimdocs wukongim/wukongimdocs:latest
|
||||||
|
docker push wukongim/wukongimdocs:latest
|
8
docker-entrypoint.sh
Normal file
8
docker-entrypoint.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
envsubst '${API_URL}' < /nginx.conf.template > /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
|
||||||
|
exec "$@"
|
10
nginx.conf.template
Normal file
10
nginx.conf.template
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user