但我为一个使用 Backblaze 的网站这样做了。我创建了一个模板,放在 /root/aws-revert-template.yml,内容如下:
# This template reverts aws-sdk-s3 to a version that works with backblaze
# 这个模板将 aws-sdk-s3 回滚到一个可以与 backblaze 兼容的版本
params:
home: /var/www/discourse
hooks:
after_bundle_exec:
- exec:
cd: $home
cmd:
- bundle config set frozen false
- "sed -i 's/gem \\\"aws-sdk-s3\\\", require: false/gem \\\"aws-sdk-s3\\\", \\\"1.177.0\\\", require: false/' Gemfile"
- bundle update aws-sdk-s3
- bundle add aws-sdk-core --version 3.215
然后像这样将它添加到我的 app.yml 中:
# IMPORTANT: SET A SECRET PASSWORD in Postgres for the Discourse User
# 重要提示:为 Discourse 用户在 Postgres 中设置一个秘密密码
# TODO: change SOME_SECRET in this template
# TODO:在此模板中更改 SOME_SECRET
templates:
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
## 如果您想添加 Let's Encrypt (https),请取消注释这两行
- "templates/web.ssl.template.yml"
- "templates/web.letsencrypt.ssl.template.yml"
- "/root/aws-revert-template.yml"
然后我运行了一个升级到 stable 的命令,似乎有效。
您也可以直接将模板中的内容添加到您的 app.yml 中。