diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 20ff919..b9fee33 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -10,6 +10,7 @@ export default defineConfig({ title: "悟空IM", description: "IM", lang: "zh-CN", + ignoreDeadLinks: true, head: [ ["meta", { name: "keywords", content: "IM" }], ["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' } ], footer: { - message: `本文档内容版权属于 悟空IM 作者,保留所有权利`, + message: `本文档内容版权属于 上海信必达网络科技有限公司,保留所有权利`, copyright: "Copyright © 2023 | Powered by 悟空IM | ICP备案号:沪ICP备2021032718号-2", }, search: { diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6b0ab88 --- /dev/null +++ b/Dockerfile @@ -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;"] \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3e06b04 --- /dev/null +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh new file mode 100644 index 0000000..9de610d --- /dev/null +++ b/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +set -eu + +envsubst '${API_URL}' < /nginx.conf.template > /etc/nginx/conf.d/default.conf + + +exec "$@" \ No newline at end of file diff --git a/nginx.conf.template b/nginx.conf.template new file mode 100644 index 0000000..954e747 --- /dev/null +++ b/nginx.conf.template @@ -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; + } +} \ No newline at end of file