Multiple development instances

AI 生成的摘要

The discussion revolves around the need for multiple development instances of Discourse. pfaffman currently switches between branches and database environments to handle different development tasks, finding it inefficient. simon faces a similar issue, wanting to test a network of Discourse sites with DiscourseConnect providers and clients on his local computer. pfaffman suggests that running multiple production sites on a local machine is possible but may require advanced DNS configuration. simon decides to test on production sites instead, due to the complexity of DNS setup.

On my development box, I find myself needing multiple instances. One site I’m importing is on stable, others use importers that I am developing. Right now what I do is when switching jobs, I switch branches in git and run a script that does

RAILS_ENV=development
export RAILS_ENV
RAILS_ENV=development bundle exec rake db:drop db:create db:migrate
bundle exec rake admin:create

It’s really annoying when I’ve, say, run an importer that takes several hours and then want to run it again with updated input (and not have to re-import the whole thing).

Is there something different I should be doing? Perhaps I should run separate instances with Vagrant? Contrive to tell Discourse to use a different database for each different job?

Or am I doing the Right Thing?

抱歉回复如此古老的话题。你最后有没有成功实现这个功能?我的用例是想在设置 Discourse 站点网络时进行一些测试,其中一些站点将作为 DiscourseConnect 提供商,而其他站点将作为 DiscourseConnect 客户端。我可以为这个设置多个生产站点,但如果能在我的本地计算机上运行这些站点就太好了。

在开发中让 DiscourseConnect(至少作为需要 URL 的源)正常工作会非常困难。如果你擅长那些 DNS 游戏(比如通过防火墙路由它们?),那么没有什么能阻止你在本地计算机上运行多个生产站点。

我不是 :slight_smile: 我将继续在生产网站上进行测试。