![]() Your S3 CDN URL points to a properly configured CDN pointing to the bucket and cache requests, as stated earlier in this document.The bucket discourse-data exists on the MinIO server and has a “public” policy set on it.You have DNS configuration properly set up for MinIO so that bucket subdomains properly resolve to the MinIO server and the MinIO server is configured with a base domain (in this case, ).This is a mandatory setup requirement for MinIO and Discourse, as MinIO still supports the legacy S3 “path” styles which are no longer supported in Discourse. You have Domain Support enabled in the MinIO configuration, for Domain driven bucket URLs.You have a fully configured MinIO server instance.There are a few caveats and requirements you need to ensure are met before you can use MinIO storage server as an alternative to S3: There are reports of clean up orphan uploads not working correctly with BackBlaze.ĭISCOURSE_S3_CONFIGURE_TOMBSTONE_POLICY: false You need to skip CORS and configure it manually. ![]() Scaleway offering is also very good, and everything works fine.Īn extra configuration parameter, HTTP_CONTINUE_TIMEOUT, is required for Vultr. #DISCOURSE_S3_BACKUP_BUCKET: falcoland-files/backup There is a third-party plugin to make the integration better at Discourse GCS Helper. See this topic for Google Cloud specific discussion. However, some suggest that if you change the role from Storage Legacy Object Owner to Storage Legacy Bucket Owner backups do work correctly. Since you can’t list files you won’t be able to list backups, and automatic backups will fail, we don’t recommend using it for backups. Also skip CORS and configure it manually. Listing files is broken, so you need an extra ENV to skip that so assets can work. Also, you need not to install the CORS rule, as it re-installs it at every rebuild.Įxample configuration: DISCOURSE_USE_S3: trueĪn extra configuration parameter, HTTP_CONTINUE_TIMEOUT, is required for Linode.ĭISCOURSE_S3_BACKUP_BUCKET: falcoland-files/backup ![]() Only problem is that their CDN offering is awfully broken, so you need to use a different CDN for the files. 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. |