用淘宝镜像替换 rubygems.org 以解决在中国的网络错误

rubygems.org hosts its resource in Amazon S3 which is disturbed by GFW. So gem and bundle complain from time to time.

This guide assumes you used docker installation. This guide also has a version in Chinese. 中文指南

Add a template

Open your congiruation file, say, app.yml.

Add a reference to the china template:

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/sshd.template.yml"
  - "templates/web.template.yml"
  - "templates/web.china.yml"

Bootstrap docker container

Rebuild your app

./launcher rebuild app

Or bootstrap:

./launcher bootstrap app

You are done! Everything should work then.

7 个赞

I think the template file’s path should be “templates/web.china.template.yml”.

1 个赞

it looks like this suggestion has been implemented. could you update the original topic so that it reflects the appropriate fix?

2 个赞

你好 @fantasticfears,感谢分享这些建议。我打算自行托管 Discourse,以避免 Discourse 官方托管带来的问题,例如访问被阻断和性能问题。

请问 Discourse 的源代码本身是否包含会被 GFW 阻断的服务请求?如果是,那么自行托管也无法保证在中国大陆的服务可用性。

附注:https://meta.discoursecn.org/t/discourse/28 目前无法访问。