-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
项目重构,帮助文档由悬浮窗升级为独立页面,并新增切换功能和submodule
- 重构为react项目,使用next.js框架 - 使用next-themes实现明亮模式和暗黑模式的切换 - 实现了网页宽度自适应和固定宽度的切换 - 使用next-mdx将帮助文档的查看方式调整为页面跳转直接展示 - 添加mirrorz-help作为submodule - 为mirror-web添加Dockerfile Signed-off-by: Mingle Tan <[email protected]>
- Loading branch information
1 parent
66899fa
commit a12b22f
Showing
212 changed files
with
8,823 additions
and
16,340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
node_modules/ | ||
build/ | ||
dist/ | ||
.next/ | ||
|
||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
|
||
.gitignore | ||
Dockerfile* | ||
.dockerignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
/.vscodeT | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/versions | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# env files (can opt-in for committing if needed) | ||
.env* | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "mdxFile"] | ||
path = mdxFile | ||
url = https://github.com/mirrorz-org/mirrorz-help.git |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# dockerfile | ||
|
||
FROM node:18-alpine AS builder | ||
|
||
# 安装 git | ||
RUN apk add --no-cache git | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
|
||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
# 配置 git 并更新子模块 | ||
RUN git config --global --add safe.directory /app && \ | ||
git config --global --add safe.directory /app/mdxFile && \ | ||
git submodule init && \ | ||
git submodule update --remote | ||
|
||
RUN npm run build | ||
|
||
FROM node:18-alpine | ||
|
||
WORKDIR /app | ||
|
||
# 复制构建产物和必要文件 | ||
COPY --from=builder /app/.next ./.next | ||
COPY --from=builder /app/public ./public | ||
COPY --from=builder /app/package.json ./package.json | ||
COPY --from=builder /app/node_modules ./node_modules | ||
COPY --from=builder /app/mdxFile ./mdxFile | ||
|
||
#next默认是3000端口,docker个人设置在8080进行监听 | ||
EXPOSE 8080 | ||
|
||
CMD ["npm", "start"] |
Oops, something went wrong.