Replace rubygems.org with taobao mirror to resolve network error in China

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를 직접 호스팅(self-host)할 계획입니다.

혹시 Discourse 소스 코드 자체에 GFW(중국 장거리 방화벽)에 의해 차단되는 서비스 요청이 있는지 아시나요? 만약 그렇다면, 중국 본토에서는 직접 호스팅하더라도 서비스 안정성을 보장할 수 없습니다.

참고로, https://meta.discoursecn.org/t/discourse/28 링크는 현재 사용할 수 없습니다.