惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
GbyAI
GbyAI
IT之家
IT之家
V
Visual Studio Blog
J
Java Code Geeks
A
About on SuperTechFans
A
Arctic Wolf
Google Online Security Blog
Google Online Security Blog
博客园 - 【当耐特】
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
W
WeLiveSecurity
L
LINUX DO - 热门话题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Martin Fowler
Martin Fowler
N
News and Events Feed by Topic
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
小众软件
小众软件
Scott Helme
Scott Helme
T
Tailwind CSS Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Palo Alto Networks Blog
罗磊的独立博客
V2EX - 技术
V2EX - 技术
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 叶小钗
宝玉的分享
宝玉的分享
K
Kaspersky official blog
S
Securelist
Cyberwarzone
Cyberwarzone
Schneier on Security
Schneier on Security
PCI Perspectives
PCI Perspectives
S
Schneier on Security
Security Latest
Security Latest
腾讯CDC
SecWiki News
SecWiki News
I
InfoQ
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
The Blog of Author Tim Ferriss
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
The Last Watchdog
The Last Watchdog
C
Check Point Blog
Hacker News: Ask HN
Hacker News: Ask HN
S
Secure Thoughts
博客园_首页
Stack Overflow Blog
Stack Overflow Blog

diss带码

datart系列04:基于threejs自定义插件3D-MAP datart系列03:图表插件开发 datart系列02:图表插件开发作品 datart系列01:图表插件开发作品大赛 我的2021年新Mac设置 小程序:Painter画布 小程序:mqtt+webview控制显示内容 小程序:webview + PDF预览 小程序:数十年Lite 验证码:五福临门 牛年开篇:网站拜年 github自定义主页秀 Davinci-二次开发系列08:mongoDB(JDBC查询)四种解决方案 Davinci-二次开发系列07:BI新元素尝试 Davinci-二次开发系列06:导出excel合并单元格 Metabase-BI系列12:0.35版本表达式是真的香 Davinci-二次开发系列05:echarts-gl map3D扩展 Davinci-二次开发系列04:自定义水印扩展 Davinci-二次开发系列03:区域地图下钻与选择
开源论坛:社区选择Discourse
dumplingbao · 2021-03-02 · via diss带码

回想以往逛论坛、贴吧的年代,似乎渐行渐远,现在人类追求的多样性超出想象,但论坛并未走下神坛,只是换了一种或者是以多种方式存在。社区、小组、圈子等都有更多的载体和工具,今天就说一下开源论坛discourse。

Discourse应该也已经20多年了,并不新鲜,也是因为平常经常浏览的技术社区用的就是discourse,所以就搭建一下,深入感受一下discourse,以备后用。

Discourse总体下来,觉得挺适合做社区,尤其是技术性比较聚集的论坛

  • 开源论坛
  • 创始人想要让改变十年未变的互联网论坛模样
  • 基于Ruby on Rails 和 Ember.js 开发,数据库使用 PostgreSQL 和 Redis
  • 最大的特点是简洁和专业性,以话题为关系聚集用户

dis

Discourse官网:

搭建步骤

安装git和Docker

1
2
apt-get install git
wget -qO- https://get.docker.io/ | sh

安装Discourse

1
2
3
4
mkdir /var/discourse
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
cp samples/standalone.yml containers/app.yml(or ./discourse-setup 初始化)

修改配置文件

1
2
3
4
5
6
7
8
9
vim containers/app.yml

UNICORN_WORKERS(如果是1Gb内存就是2,2GB内存以上就是3-4)
DISCOURSE_DEVELOPER_EMAILS管理员邮箱
DISCOURSE_HOSTNAME 绑定的域名
DISCOURSE_SMTP_ADDRESS是邮局服务器
DISCOURSE_SMTP_PORT是SMTP的端口
DISCOURSE_SMTP_USER_NAME账号
DISCOURSE_SMTP_PASSWORD密码

特别注意的是:端口号465是没有效果的

1
DISCOURSE_SMTP_PORT: 587

以上配置完了,会收不到邮件有两种方式修改

第一种:用官方的工具launcher创建管理员账号

1
2
3
cd /var/discourse
./launcher enter app
rake admin:create
  • 创建管理员账号,按要求输入管理员邮箱和登录密码
  • 登录网站,用刚才创建的账号直接登录。
  • 在settings页面设置notification email为发件邮箱,就是之前配置文件里面写的那个邮箱。
  • 在邮件测试页面发一封测试邮件,应该测试成功了。

第二种:编辑发件邮箱

1
2
3
4
5
vim containers/app.yml
//定位文件底部,打开注释
- exec: rails r "SiteSetting.notification_email='xxx@qq.com'"
//重新build一下
./launcher rebuild app

修改完成后,重新构建

1
./launcher rebuild app

nginx与discourse

discourse配置修改:

1
2
cd /var/discourse
vim containers/app.yml

修改:(设置端口代理)

1
2
expose:
- "9090:80" # http

最后运行

1
./launcher rebuild app

nginx增加配置:

增加discourse.conf即可

添加Github第三方登录

打开Github application,进入Developer applications,新建应用程序

Homepage url为你的discourse地址,authorization callback url为你的discourse地址加上/auth/github/callback,然后复制Client ID和Client Secret,
最后打开discourse,进入管理-设置-登录,找到下图所示三个字段,勾选填入刚才复制的内容

然后确定、完成。

点击=>完成!

常见问题

计算技术论坛关于discourse的问题:https://www.ossez.com/search?q=discourse

其它

体验了一下Discourse的管理界面和可配置的操作,后台支持定制化的配置和插件化,而且确实很简洁,并能够提供对外API,有时间可以继续探究

我的discourse地址:https://lt.disscode.cn/