owrh
2019 年12 月 2 日 15:53
1
我们有一个在 AWS 上运行的论坛,使用自定义域名并通过 Let’s Encrypt 启用 SSL,现在希望迁移到 Digital Ocean,理想情况下实现零停机。请问是否有推荐的行业最佳实践?我遇到过各种问题。
我首先尝试设置新实例并启用 Let’s Encrypt,但这引发了各种问题(例如:SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)——这大概是因为我试图在配置中使用与现有在线站点相同的域名来设置新实例。
随后,我尝试在不启用 SSL 的情况下设置实例(但实例仍配置为使用相同的域名),并从在线站点恢复备份。这次恢复过程失败了,看起来问题出在域名相关配置上。
在新域名上设置新实例非常简单(非常感谢! ),但若要创建一个新实例,然后通过切换 DNS 来完成迁移,似乎非常困难。除非,我仅仅是操作有误!
任何帮助都将不胜感激。
pfaffman
(Jay Pfaffman)
2019 年12 月 2 日 17:13
2
I’m not making any promises, but if the current site is a standard install, you can copy over your the letsencrypt and ssl directories and those certs should get copied over and it’ll rebuild just fine. It can be a bit tricky, though.
Worst case, you’ll need to rebuild the site after the DNS switch.
D8vid
2020 年3 月 26 日 21:43
3
修改后的 INSTALL-cloud.md 指令能否在新的目标主机上生效?
sudo -s
git clone GitHub - discourse/discourse_docker: A Docker image for Discourse · GitHub /var/discourse
cd /var/discourse
[从当前运行实例中复制 letsencrypt、ssl 目录以及 containers/app.yml]
./discourse-setup
接下来是否通过 Web 界面从备份恢复,然后切换 DNS?
在切换 DNS 之前,有哪些推荐的测试步骤?
非常感谢任何有用的提示!
pfaffman
(Jay Pfaffman)
2020 年3 月 26 日 21:46
4
您不需要 discourse-setup,只需运行 ./launcher rebuild app。您应该能够将本地 DNS 更改为指向新服务器,使其正常工作。