# 配置兼容S3的对象存储提供商用于上传

**URL:** <https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916>\
**Category:** Self-Hosting\
**Tags:** cdn, configuring, how-to, reference\
**Created:** [2020年四月22日 22:37 UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916 "2020-04-22T22:37:37Z")\
**Posts on this page:** 1\
**Showing post:** 326

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2022年七月1日 16:48 UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916/326 "2022-07-01T16:48:56Z")

</div>

不。

它将变成：

```yaml
## 插件放在这里
## 详情请参阅 https://meta.discourse.org/t/19157
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/docker_manager.git
  after_assets_precompile:
    - exec:
        cd: $home
        cmd:
          - sudo -E -u discourse bundle exec rake s3:upload_assets

```

YAML 是一种树状数据结构，空格缩进定义了结构。

---

_[View the full topic](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916)._
