Configure an S3 compatible object storage provider for uploads

I will try to summarize the answers to my questions:

  • Do the Web UI and ENV variable collide ?
  • When are the assets supposed to be uploaded to the bucket ?
    By adding this snippet to the app.yml in the hook section, it will be uploaded after_assets_precompile (during rebuild app).
  • How can I debug this ? I don’t see any error in the logs
    By running :
cd /var/discourse
sudo ./launcher enter app
sudo -E -u discourse bundle exec rake s3:upload_assets --trace
  • Is it possible to set a subfolder of a bucket in the config ?

You can use prefixes to organize the data that you store in Amazon S3 buckets. A prefix is a string of characters at the beginning of the object key name. A prefix can be any length, subject to the maximum length of the object key name (1,024 bytes). You can think of prefixes as a way to organize your data in a similar way to directories. However, prefixes are not directories.

  • Once this works, Are the previously uploaded images transferred to the bucket ? If I rebake, what will the url of the previously uploaded images look like ?
3 Likes