What we officially support and use internally. If you want to spin a Discourse that works properly with Object Storage since the beginning you need to set the env vars so the assets are uploaded before the site starts.Ĭhoose your provider from the list below and add these settings to the env section of your app.yml file, adjusting the values accordingly: AWS S3 Also, the task to upload assets happen after assets are compiled, which happens in a rebuild. The bucket name was set to falcoland-files in my examples.Ĭonfiguring these settings in environment variables in your app.yml is recommended because it’s how CDCK does it in their infrastructure, so it’s well-tested. In the following examples is a CDN configured to serve the files under the bucket. Not using a CDN (or entering the bucket URL as the CDN URL) is likely to cause problems and is not supported. We recommend those being different and for admins to set both. It will be mainly used for pushable assets: JS, images and user uploads. It will be used mainly for pullable assets: CSS and other theme assets.ĭISCOURSE_S3_CDN_URL is a CDN that points to your object storage bucket and caches requests. I used StackPath CDN in my testing, and other than needing to set Dynamic Caching By Header: Accept-Encoding in their configuration it works ok.ĭISCOURSE_CDN_URL is a CDN that points to you Discourse hostname and caches requests. When using object storage, you also need a CDN to serve what gets stored in the bucket. sudo -E -u discourse bundle exec rake s3:expire_missing_assets sudo -E -u discourse bundle exec rake s3:upload_assets In order to store Discourse static assets in your Object Storage add this configuration on your app.yml under the hooks section: after_assets_precompile: If you got a different service working, please add it to this wiki.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |