discourse論壇搭建教程

1.前言
discourse是一個(gè)優(yōu)秀的論壇平臺(tái),相較于flarum,它使用的更多。
項(xiàng)目地址:https://github.com/discourse/discourse
官方網(wǎng)址:https://www.discourse.org/
夜夢(mèng)博客地址:https://tech.yemengstar.com/?p=3628
使用的服務(wù)器:https://www.rainyun.com/YeMeng_

2.配置需求
官方給出的配置要求并不高,只需要1G(開啟SWAP)即可運(yùn)行,最少10GB硬盤空間。
這里夜夢(mèng)使用的配置為2C2G,系統(tǒng)為Ubuntu22.04
3.前期準(zhǔn)備
3.1官方提示
官方給出的唯一支持的安裝方式是docker安裝,
The only officially supported installs of Discourse are?Docker?based. You must have SSH access to a 64-bit Linux server?with Docker support. We regret that we cannot support any other methods of installation including cpanel, plesk, webmin, etc.
基礎(chǔ)安裝:?https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md
大型/多服務(wù)安裝: https://github.com/discourse/discourse_docker
夜夢(mèng)這里僅演示基礎(chǔ)安裝的過(guò)程。
3.2域名準(zhǔn)備
discourse不可以使用IP進(jìn)行訪問,所以你必須使用一個(gè)域名。夜夢(mèng)這里使用namesilo上面注冊(cè)的域名進(jìn)行演示。
namesilo:https://www.namesilo.com/
結(jié)賬時(shí)使用優(yōu)惠碼dreamorrow即可減免一美元費(fèi)用。
3.3郵箱準(zhǔn)備
???Email is CRITICAL for account creation and notifications in Discourse.?If you do not properly configure email before bootstrapping YOU WILL HAVE A BROKEN SITE!
對(duì)郵箱的要求比較苛刻,建議大家閱讀官方文檔:
官方文檔:https://meta.discourse.org/t/troubleshooting-email-on-a-new-discourse-install/16326
夜夢(mèng)這里使用的是mailjet:http://mailjet.com/
推薦參考文章:https://meta.discourse.org/t/howto-use-mailjet-as-a-free-smtp-service-for-discourse/206262
4.開始安裝
請(qǐng)全程保持root身份!
4.1安裝discourse
克隆項(xiàng)目到本地:
4.2編輯配置文件
啟動(dòng)配置工具:
耐心等待安裝,然后按照要求依次填入信息:
填寫完成后,等待完成即可!
如果你需要修改配置文件,請(qǐng)?jiān)俅芜\(yùn)行./discourse-setup
或者編輯/containers/app.yml
文件,編輯完成后,重新啟動(dòng):./launcher rebuild app
5.進(jìn)入discourse
訪問先前準(zhǔn)備的域名,開始設(shè)置即可!

