1.0.6 版本加入的gravatar因被GFW block会造成问题,需注意

两周前发现不能注册新用户,重新构建时也失败,最后在 @fantasticfears 帮助下确定是gravatar服务器被墙造成connection-timed-out。

希望大家注意避开这个坑,我已在https://meta.discourse.org/t/bootstrap-failed-gravatar-connection-timed-out/ 给出解决方案

在web.china.template.yml 加入一行:

- sed -i "$(sed -n '/automatically_download_gravatars/=' /var/www/discourse/config/site_settings.yml)s/true/false/" /var/www/discourse/config/site_settings.yml
5赞

请问一下应该加在web.china.template.yml 文件的什么位置呢?

我加在最后一行但是报错:

RuntimeError: cd /var/www/discourse && su discourse -c 'bundle install --deployment --verbose --without test --without development' failed with return #<Process::Status: pid 307 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
0982b7902dd25803ef3f0d167701807bea6337e68bda62cf21c4a43d8b8ee0e3
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
[root@iZ23qa9mgy6Z discourse_docker]# sudo nano templates/web.china.template.yml 
[root@iZ23qa9mgy6Z discourse_docker]# ./launcher bootstrap app
which: no docker.io in (/root/.composer/vendor/bin:/usr/java/jdk1.5.0_22/bin:$JAVA_HOME/bin:$PATH:/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin:/usr/local/ant/apache-ant-1.9.4/bin:/a/apps/php-5.4.24/bin:/root/bin)
(<unknown>): did not find expected key while parsing a block mapping at line 1 column 1 -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=2 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e DISCOURSE_DEVELOPER_EMAILS=admin@come2feed.me -e DISCOURSE_HOSTNAME=talk.come2feed.me -e DISCOURSE_SMTP_ADDRESS=smtp.exmail.qq.com -e DISCOURSE_SMTP_PORT=465 -e DISCOURSE_SMTP_USER_NAME=admin@come2feed.me -e DISCOURSE_SMTP_PASSWORD=52iib8qi -e DISCOURSE_SMTP_ENABLE_START_TLS=true -e DISCOURSE_SMTP_AUTHENTICATION=login -e DISCOURSE_SMTP_OPENSSL_VERIFY_MODE=none
YAML syntax error. Please check your /var/discourse/containers/*.yml config files.

Gravatar 已经基本被移除出核心了,不用担心这个问题了,简单禁用 Gravatar 即可。

请问如何在安装的一开始就禁用Gravatar?

Discourse 已经不默认 Gravatar 很久了…