![]() Also skip CORS and configure it manually. Listing files is broken, so you need an extra ENV to skip that so assets can work. Only problem is that their CDN offering is awfully broken, so you need to use a different CDN for the files.Įxample configuration: DISCOURSE_USE_S3: trueĪn extra configuration parameter, HTTP_CONTINUE_TIMEOUT, is required for Linode.ĭISCOURSE_S3_BACKUP_BUCKET: falcoland-files/backup It is fine to enable Restrict File Listing. DISCOURSE_USE_S3: trueĭISCOURSE_S3_SECRET_ACCESS_KEY: mysecretkeyĭISCOURSE_S3_BACKUP_BUCKET: falcoland-files/backupsĭO offering is good and works out of the box. See Set up file and image uploads to S3 for how to configure the permissions properly. Their CDN offering Cloudfront also works to front the bucket files. 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 |