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([[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