diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5d35edb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +# 构建阶段 + +# 使用 bun 镜像作为构建基础镜像 +FROM oven/bun:alpine AS build + +# 设置目录为 /app +WORKDIR /app + +# 将 package 文件复制到镜像中 +COPY package*.json ./ + +# 安装依赖 +RUN bun install + +# 复制所有源代码到镜像中 +COPY . . + +# 构建 Vue 项目 +RUN bun run build + +# 运行阶段 + +# 使用 nginx 镜像作为运行时基础镜像 +FROM nginx:alpine + +# 从构建阶段的镜像中复制构建好的静态文件到 nginx 的默认静态文件目录中 +COPY --from=build /app/dist /usr/share/nginx/html + +# 复制自定义的 Nginx 配置文件到 Nginx 的配置目录 +COPY ./nginx.conf /etc/nginx/nginx.conf + +# 暴露 80 端口 +EXPOSE 80 + +# 启动 Nginx 并保持在前台运行 +CMD [ "nginx", "-g", "daemon off;" ] \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 8a495e2..72eb119 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..a63e29b --- /dev/null +++ b/nginx.conf @@ -0,0 +1,44 @@ +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + server { + listen 80; + server_name weilai.team www.weilai.team; + + root /usr/share/nginx/html; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + } +} \ No newline at end of file diff --git a/package.json b/package.json index 0069b33..ee393d7 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@tiptap/extension-horizontal-rule": "^2.10.3", "@tiptap/extension-paragraph": "^2.10.3", "@tiptap/extension-text": "^2.10.3", + "@tiptap/vue-3": "^2.10.3", "@vee-validate/zod": "^4.14.7", "@vueuse/core": "^12.0.0", "axios": "^1.7.7", diff --git a/src/components/login/ForgotPassword.vue b/src/components/login/ForgotPassword.vue index 8723d0a..104c80a 100644 --- a/src/components/login/ForgotPassword.vue +++ b/src/components/login/ForgotPassword.vue @@ -1,91 +1,109 @@ - - - - 忘记密码 + + + 忘记密码 + + + + 找回密码 + 忘记密码?输入邮箱找回密码吧。 + + + + 邮箱 + + + + 验证码 + + + + 获取验证码 - - - - 找回密码 - - 忘记密码?输入邮箱找回密码吧。 - - - - - - 邮箱 - - - - - - 验证码 - - - - - 获取验证码 - - {{ loginStore.countdown }}s后重新发送 - - - - - 密码 - - - - - - 确认密码 - - - - - - - 确认 - - - - + {{ loginStore.countdown }}s后重新发送 + + + + 密码 + + + + 确认密码 + + + + + + 确认 + + + + \ No newline at end of file +