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

推荐订阅源

Google DeepMind News
Google DeepMind News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Threat Research - Cisco Blogs
G
GRAHAM CLULEY
The Hacker News
The Hacker News
S
Securelist
K
Kaspersky official blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
H
Hacker News: Front Page
P
Privacy & Cybersecurity Law Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News | PayPal Newsroom
Project Zero
Project Zero
H
Heimdal Security Blog
TaoSecurity Blog
TaoSecurity Blog
The Cloudflare Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tenable Blog
The Last Watchdog
The Last Watchdog
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
S
Schneier on Security
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
月光博客
月光博客
博客园_首页
V
Visual Studio Blog
宝玉的分享
宝玉的分享
IT之家
IT之家
PCI Perspectives
PCI Perspectives
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
F
Fortinet All Blogs
U
Unit 42
Help Net Security
Help Net Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
MongoDB | Blog
MongoDB | Blog
G
Google Developers Blog
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky

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/