feat(部署): 新增 deployment/ 内外网两套按侧部署包

按 demo/ 的写法把交付包改成「角色由目录决定」:iw/ 拷内网机、ow/ 拷外网机,
各自含镜像 tar、SQL、配置与 install.sh,install.sh 不再收 iw/ow 参数。

前端不再打进镜像,改为静态包放在 <侧>/web/ 只读挂进 nginx:1.27-alpine,
现场临时改页面直接替换文件 + restart web 即可。数据仍全部挂宿主机,
子目录命名与 deploy/offline 一致(pgdata/redis/mq/upload/logs/gate),
默认根改为包内 ./volumes,放数据盘只改 .env 的 SFILE_DATA_ROOT。

后端镜像 sfile-app:1.0.1 含传输优化那一批(实测组包 11.4×、解包 9.9×)。
出包脚本 deployment/scripts/build-package.sh 负责 jar→镜像→前端双包→sql→tar→VERSION。
This commit is contained in:
KodouWZF
2026-11-04 21:44:56 +08:00
parent 339f2c34ab
commit d39b3b035d
884 changed files with 316455 additions and 0 deletions

View File

@@ -0,0 +1 @@
import{$ as e,Bt as t,G as n,H as r,It as i,Jt as a,K as o,Q as s,Qt as c,R as l,U as u,V as d,Vn as f,Vt as p,W as m,Zt as h,et as g,ln as _,q as v,qn as y,qt as b,tt as x,yn as S,z as C,zn as w,zt as T}from"./index-BaTxSAlR.js";import{a as E,n as D,o as O,r as k,s as A,t as j}from"./dialog-CnxDxMp1.js";const M=e=>{let{mutateAsync:n,isPending:r}=S({mutationFn:p,...e||{}}),{mutateAsync:a,isPending:o}=S({mutationFn:t,...e||{}}),{mutateAsync:s,isPending:c}=S({mutationFn:i,...e||{}}),l=e=>t=>{_.promise(e(t),{loading:`提交中...`,success:`操作成功`})};return{enable:l(n),disable:l(a),adminCancel:l(s),enableIsPending:r,disableIsPending:o,cancelIsPending:c}};var N=y(f(),1),P=y(w(),1),F=s({newPassword:e().nonempty({message:`新密码不能为空`}),confirmPassword:e().nonempty({message:`确认密码不能为空`})});function I({open:e,setOpen:t,data:i}){let{mutateAsync:s,isPending:l}=S({mutationFn:a,onSuccess(){t(!1)}}),f=x({resolver:g(F),defaultValues:{newPassword:``,confirmPassword:``}});(0,N.useEffect)(()=>{e&&f.reset()},[e]);let p=e=>{_.promise(s({...e,userId:i.userId??i.id}),{loading:`提交中...`,success:`修改成功`})};return(0,P.jsx)(j,{open:e,onOpenChange:t,children:(0,P.jsxs)(k,{className:`w-[400px]`,children:[(0,P.jsx)(O,{children:(0,P.jsx)(A,{children:`重置密码`})}),(0,P.jsx)(r,{...f,children:(0,P.jsxs)(`form`,{onSubmit:f.handleSubmit(p),className:`space-y-4`,children:[(0,P.jsx)(m,{control:f.control,name:`newPassword`,render:({field:e})=>(0,P.jsxs)(n,{children:[(0,P.jsx)(o,{children:`新密码`}),(0,P.jsx)(u,{children:(0,P.jsx)(d,{...e,type:`password`})}),(0,P.jsx)(v,{})]})}),(0,P.jsx)(m,{control:f.control,name:`confirmPassword`,render:({field:e})=>(0,P.jsxs)(n,{children:[(0,P.jsx)(o,{children:`确认密码`}),(0,P.jsx)(u,{children:(0,P.jsx)(d,{...e,type:`password`})}),(0,P.jsx)(v,{})]})}),(0,P.jsxs)(E,{children:[(0,P.jsx)(D,{asChild:!0,children:(0,P.jsx)(c,{variant:`outline`,children:`取消`})}),(0,P.jsxs)(c,{type:`submit`,disabled:l,children:[l&&(0,P.jsx)(h,{}),`确定`]})]})]})})]})})}const L=e=>{let{mutateAsync:t,isPending:n}=S({mutationFn:e=>e.id?b(e):T(e),...e||{}});return{save:e=>{_.promise(t(e),{loading:`提交中...`,success:`操作成功`})},saveIsPending:n}};var R=`Qaz123567!@#`,z=t=>s({phone:t?e().nonempty({message:`手机号不能为空`}):e().optional(),username:t?e().optional():e().nonempty({message:`用户名不能为空`}),realName:e().nonempty({message:`真实姓名不能为空`})});function B({open:e,setOpen:t,refetch:i,data:a}){let s=(a==null?void 0:a.userId)??(a==null?void 0:a.id),f=(0,N.useMemo)(()=>!s,[s]),p=x({resolver:g((0,N.useMemo)(()=>z(f),[f])),defaultValues:{phone:``,username:``,realName:``}}),_=p.watch(`phone`),{save:y,saveIsPending:b}=L({onSuccess(){t(!1),i==null||i()}});(0,N.useEffect)(()=>{e&&(p.reset(),a&&(p.setValue(`username`,(a==null?void 0:a.username)||``),p.setValue(`realName`,(a==null?void 0:a.realName)||``)))},[e,a,p]);let S=e=>{y({id:s,...e})};return(0,P.jsx)(j,{open:e,onOpenChange:t,children:(0,P.jsxs)(k,{className:`w-[400px]`,children:[(0,P.jsx)(O,{children:(0,P.jsx)(A,{children:f?`创建用户`:`修改用户`})}),(0,P.jsx)(r,{...p,children:(0,P.jsxs)(`form`,{onSubmit:p.handleSubmit(S),className:`space-y-4`,children:[(0,P.jsx)(m,{control:p.control,name:f?`phone`:`username`,render:({field:e})=>(0,P.jsxs)(n,{children:[(0,P.jsx)(o,{children:`手机号`}),(0,P.jsx)(u,{children:(0,P.jsx)(d,{...e})}),(0,P.jsx)(v,{})]})}),(0,P.jsx)(m,{control:p.control,name:`realName`,render:({field:e})=>(0,P.jsxs)(n,{children:[(0,P.jsx)(o,{children:`真实姓名`}),(0,P.jsx)(u,{children:(0,P.jsx)(d,{...e})}),(0,P.jsx)(v,{})]})}),f&&(0,P.jsx)(l,{children:(0,P.jsxs)(C,{children:[(0,P.jsxs)(`div`,{children:[`用户账号:`,_]}),(0,P.jsxs)(`div`,{children:[`初始密码:`,R]})]})}),(0,P.jsxs)(E,{children:[(0,P.jsx)(D,{asChild:!0,children:(0,P.jsx)(c,{variant:`outline`,children:`取消`})}),(0,P.jsxs)(c,{type:`submit`,disabled:b,children:[b&&(0,P.jsx)(h,{}),`确定`]})]})]})})]})})}export{I as n,M as r,B as t};