ci: GHCR docker build for Lite branch + compose updates
- .github/workflows/docker-lite.yml: build & push ghcr.io/lezi-fun/ forumlify-deploy:lite on Lite branch push (linux/amd64+arm64) - docker-compose.yml: pull :lite image from GHCR, add PORT / ENABLE_ CAPTCHA env, restart: unless-stopped on both services
This commit is contained in:
1 parent
8f88f803f5
commit
9e407d0a2d
1532 files changed
+645187
-1
No files matched your search
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[409],{7589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(3634)}])},3634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(7043);let i=n(7437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[971,117,744],function(){return e(e.s=7589)}),_N_E=e.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{6346:function(e,t,n){Promise.resolve().then(n.t.bind(n,7960,23)),Promise.resolve().then(n.bind(n,7142)),Promise.resolve().then(n.bind(n,9505))},7142:function(e,t,n){"use strict";n.d(t,{default:function(){return u}});var r=n(2265);function u(){return(0,r.useEffect)(()=>{let e=document.createElement("link");e.rel="stylesheet",e.href="/api/custom-css",e.id="custom-css-link",document.head.appendChild(e)},[]),null}},9505:function(e,t,n){"use strict";n.d(t,{ToastProvider:function(){return l},p:function(){return s}});var r=n(7437),u=n(2265),c=n(4887);let i=(0,u.createContext)(null);function s(){return(0,u.useContext)(i)}let o=0;function l(e){let{children:t}=e,[n,s]=(0,u.useState)([]),l=(0,u.useRef)({}),d=(0,u.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e3,r=++o;s(n=>[...n,{id:r,message:e,type:t}]),l.current[r]&&clearTimeout(l.current[r]),l.current[r]=setTimeout(()=>{s(e=>e.filter(e=>e.id!==r)),delete l.current[r]},n)},[]),a=(0,u.useCallback)(e=>{s(t=>t.filter(t=>t.id!==e)),l.current[e]&&(clearTimeout(l.current[e]),delete l.current[e])},[]);return(0,r.jsxs)(i.Provider,{value:{toast:d},children:[t,"undefined"!=typeof document&&(0,c.createPortal)((0,r.jsx)("div",{className:"toast-container",children:n.map(e=>(0,r.jsx)("div",{className:"toast toast-"+e.type,onClick:()=>a(e.id),children:e.message},e.id))}),document.body)]})}},7960:function(){}},function(e){e.O(0,[587,971,117,744],function(){return e(e.s=6346)}),_N_E=e.O()}]);
|
||||
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{754:function(e,t,a){Promise.resolve().then(a.bind(a,7603))},7603:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return ea}});var r=a(7437),s=a(2265);let n=null;function i(e){n=e,e?localStorage.setItem("forumlify-token",e):localStorage.removeItem("forumlify-token")}async function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a={...t.headers||{}};t.body&&"string"==typeof t.body&&(a["Content-Type"]="application/json"),n&&(a.Authorization="Bearer "+n);let r=await fetch("/api"+e,{...t,headers:a}),s=await r.json().catch(()=>({}));if(!r.ok||s.error){let e=Error(s.error||"请求失败");throw e.status=r.status,e}return s}n=localStorage.getItem("forumlify-token")||null;let o={async login(e,t){let a=await l("/auth/login",{method:"POST",body:JSON.stringify({email:e,password:t})});return a.token&&i(a.token),a},register:(e,t,a)=>l("/auth/register",{method:"POST",body:JSON.stringify({email:e,password:t,username:a})}),logout(){i(null)},getMe:()=>l("/auth/me"),getPosts(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:20,s="/posts?sort="+(e||"latest")+"&page="+a+"&limit="+r;return t&&(s+="&user_id="+t),l(s)},getPost:e=>l("/posts/"+e),createPost:(e,t,a)=>l("/posts",{method:"POST",body:JSON.stringify({title:e,content:t,images:a||[]})}),updatePost:(e,t,a,r)=>l("/posts/"+e,{method:"PUT",body:JSON.stringify({title:t,content:a,images:r})}),togglePinPost:e=>l("/posts/"+e+"/pin",{method:"PUT"}),deletePost:e=>l("/posts/"+e,{method:"DELETE"}),getReplies:e=>l("/posts/"+e+"/replies"),createReply:(e,t)=>l("/posts/"+e+"/replies",{method:"POST",body:JSON.stringify({content:t})}),deleteReply:e=>l("/replies/"+e,{method:"DELETE"}),getUsers:()=>l("/users"),getUsersByUsername:e=>l("/users?username="+encodeURIComponent(e)),updateUserRole:(e,t)=>l("/users/"+e+"/role",{method:"PUT",body:JSON.stringify({role:t})}),updateProfile:(e,t,a,r)=>l("/users/"+e,{method:"PUT",body:JSON.stringify({username:t,bio:a,signature:r})}),updateAvatar:(e,t)=>l("/users/"+e+"/avatar",{method:"PUT",body:JSON.stringify({avatar_url:t})}),updatePassword:(e,t,a)=>l("/users/"+e+"/password",{method:"PUT",body:JSON.stringify({oldPassword:t,newPassword:a})}),updateEmail:(e,t,a)=>l("/users/"+e+"/email",{method:"PUT",body:JSON.stringify({password:t,newEmail:a})}),getReports:()=>l("/reports"),createReport:(e,t)=>l("/reports",{method:"POST",body:JSON.stringify({post_id:e,reason:t})}),updateReport:(e,t,a)=>l("/reports/"+e,{method:"PUT",body:JSON.stringify({status:t,note:a})}),getStats:()=>l("/stats"),getSettings:()=>l("/settings"),updateSettings:e=>l("/settings",{method:"PUT",body:JSON.stringify({forum_name:e})}),getLinks:()=>l("/links"),addLink:(e,t)=>l("/links",{method:"POST",body:JSON.stringify({title:e,url:t})}),deleteLink:e=>l("/links/"+e,{method:"DELETE"}),getEventLogs:()=>l("/event-logs"),logEvent:e=>l("/event-logs",{method:"POST",body:JSON.stringify({action:e})}).catch(()=>{}),getConversations:()=>l("/conversations"),getOrCreateConversation:e=>l("/conversations",{method:"POST",body:JSON.stringify({other_user_id:e})}),getMessages:e=>l("/conversations/"+e+"/messages"),sendMessage:(e,t)=>l("/conversations/"+e+"/messages",{method:"POST",body:JSON.stringify({content:t})}),markMessageRead:e=>l("/messages/"+e+"/read",{method:"PUT"}),getCustomPages:()=>l("/custom-pages"),getCustomPage:e=>l("/custom-pages/"+e),adminGetCustomPages:()=>l("/admin/custom-pages"),adminCreateCustomPage:(e,t,a)=>l("/admin/custom-pages",{method:"POST",body:JSON.stringify({name:e,title:t,content:a})}),adminUpdateCustomPage:(e,t,a,r)=>l("/admin/custom-pages/"+e,{method:"PUT",body:JSON.stringify({title:t,content:a,enabled:r})}),adminDeleteCustomPage:e=>l("/admin/custom-pages/"+e,{method:"DELETE"}),uploadCustomCss(e){let t=new FormData;t.append("file",e);let a={};return n&&(a.Authorization="Bearer "+n),fetch("/api/admin/custom-css",{method:"POST",body:t,headers:a}).then(async e=>{let t=await e.json().catch(()=>({}));if(!e.ok||t.error)throw Error(t.error||"上传失败");return t})},deleteCustomCss:()=>l("/admin/custom-css",{method:"DELETE"}),getNotifications:()=>l("/notifications"),markNotificationRead:e=>l("/notifications/"+e+"/read",{method:"PUT"}),markAllNotificationsRead:()=>l("/notifications/read-all",{method:"PUT"}),generateRecoveryCodes:()=>l("/auth/recovery-codes/generate",{method:"POST"}),getRecoveryCodeCount:()=>l("/auth/recovery-codes/count"),resetPassword:(e,t,a)=>l("/auth/reset-password",{method:"POST",body:JSON.stringify({email:e,recoveryCode:t,newPassword:a})})};async function d(e){let t=new FormData;t.append("file",e);let a={};n&&(a.Authorization="Bearer "+n);let r=await fetch("/api/upload",{method:"POST",body:t,headers:a}),s=await r.json().catch(()=>({}));if(!r.ok||s.error)throw Error(s.error||"上传失败");return s.url}function c(){let e=Math.floor(9*Math.random())+1,t=Math.floor(9*Math.random())+1,a=["+","-"][Math.flLine truncated
|
||||
Reference in new issue
Block a user