Skip to content

Commit

Permalink
项目重构,帮助文档由悬浮窗升级为独立页面,并新增切换功能和submodule
Browse files Browse the repository at this point in the history
- 重构为react项目,使用next.js框架
- 使用next-themes实现明亮模式和暗黑模式的切换
- 实现了网页宽度自适应和固定宽度的切换
- 使用next-mdx将帮助文档的查看方式调整为页面跳转直接展示
- 添加mirrorz-help作为submodule
- 为mirror-web添加Dockerfile

Signed-off-by: Mingle Tan <[email protected]>
  • Loading branch information
paithfinder committed Jan 23, 2025
1 parent 66899fa commit a12b22f
Show file tree
Hide file tree
Showing 212 changed files with 8,823 additions and 16,340 deletions.
16 changes: 16 additions & 0 deletions .dockerignore
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

42 changes: 42 additions & 0 deletions .gitignore
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
3 changes: 3 additions & 0 deletions .gitmodules
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
1 change: 0 additions & 1 deletion CODEOWNERS

This file was deleted.

39 changes: 39 additions & 0 deletions Dockerfile
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"]
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

Loading

0 comments on commit a12b22f

Please sign in to comment.