如何仅使用HTTP(无HTTPS)创建本地Discourse

我正在尝试在我的笔记本电脑上安装 Discourse,以便在对我的真实版本进行更改之前进行一些测试。(编写将在真实 Docker 实例上运行的脚本)

我的笔记本电脑没有域名,因此我无法获得 Let’s Encrypt SSL 证书。

如何安装一个仅限 HTTP 的实例?

我注释掉了 app.yaml 中的 SSL 行,并尝试在 ./discourse-setup --skip-connection-test 中绕过 SSL,但引导失败:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 3649 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

此版本不适合本地安装。标准安装适用于云部署。

请使用 dev-install

3 个赞

我应该以某种方式做到这一点,因为我在台式电脑的本地主机上运行了一个安装,但我记不起是怎么做到的了。
我正试图在旅行前在我的笔记本电脑上完成它。

我看不出在这里浪费时间有什么价值。走老路,使用开发安装。甚至还有一个 Docker 版本!

我设法让它工作了。在 YAML 文件中注释掉与端口 443 和 Let’s Encrypt 相关的行。然后使用 ./discourse-setup --skip-connection-test

我使用 localhost 作为主机名进行了设置,并且奏效了。我想上次之所以没成功,是因为我忘了注释掉 Let’s Encrypt 的行。

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.