Giter Club home page Giter Club logo

locnode's Introduction

鉴于国内的论坛管理人员素质,发布这个分布式无服务器论坛。 顾名思议,它是强调分治的, 虽然一个节点不能负载大规模流量和用户(cf配额有限) 但胜在一键部署,多节点可以分治组合成大流量社区

🚀 安装

共3步

第一步. Fork本仓库到你的GitHub帐号

登你的github,然后点击 https://github.com/minlearn/locnode/fork 把仓库fork到你的github帐号

第二步. 在你fork到的仓库里面加几个部署相关的密码变量

进入你fork到的仓库的 Settings -> Secrets -> Actions, 创建几个部署相关的密码变量,共3个(最后2个r2相关的不需要),如何获取这些变量及如何复制为变量(请展开查看细节):

Screenshot 2022-12-04 at 4 10 46 PM

如何获得CLOUDFLARE_ACCOUNT_ID变量 登录cf面板会自动跳到:https://dash.cloudflare.com/[你的帐号id] ,比如这样:https://dash.cloudflare.com/fff88980eeeeedcc3ffffd4f555f4999, 后面的 * fff88980eeeeedcc3ffffd4f555f4999 * 就是帐号id 将其复制到仓库的[Settings -> Secrets -> Actions](../../settings/secrets/actions) 处即可,注意复制到不要有多余字符,会显示为星号, Screenshot 2022-12-17 at 10 31 10 AM
如何获得CLOUDFLARE_API_TOKEN变量 登录cf,定位到: https://dash.cloudflare.com/profile/api-tokens 创建一个custom token: Screenshot 2022-12-04 at 4 30 57 PM 修改token的权限,放行Cloudflare Pages 和 D1: Screenshot 2022-12-04 at 4 31 41 PM 像复制帐号id一样复制为仓库的对应名字变量
给要部署到cf的整套应用取一个名字前缀CLOUDFLARE_PROJECT_NAME 随便都可以,就是不要带._等特殊符号,比如你取名为discuss,或discussmyxxxdomain都可以 像复制帐号id一样复制为仓库的对应名字变量

第三步. 在你fork到的仓库里面运行部署

前往 Actions -> Deploy to Cloudflare Pages 运行deploy
Screenshot 2022-12-04 at 4 11 19 PM

最后,检查结果

等部署完毕, 绿点表示成功. 你可以在 Cloudflare dashboard 处看到已生成形式为 CLOUDFLARE_PROJECT_NAME变量.pages.dev 的pages应用,点击即可访问

设置:

在fork的git仓库里编辑dist/_workers.js源码,找到以下并修改,注意格式,比如,invite后面的on改成off可关闭邀请

exports=JSON.parse('{"backend":"/","defaults":{"sitetitle":"Locnode","dismissmessage":"第一款能在cf上运行的分布式轻量论坛, 相关咨询联系tg:https://t.me/minlearn_1keydd"},"invite":"on"}'

然后覆盖部署即可

常规操作在论坛界面上即可操作。其它的将用户设为仲裁员和增加注册码的工作,请直接在d1数据库中操作。

locnode's People

Contributors

minlearnminlearn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.