Настройка провайдера объектного хранилища, совместимого с S3, для загрузки файлов

Would love to say your post is the best.

1 лайк

I found the problem, is that Oracle Object Storage, uses path style.

And Discourse doesn’t give me the option to use path style, it wants to force me to use virtual host style.

I wish I could choose that.

Even the minio has to be configured to suit the virtual host style.

1 лайк

Considering that every major cloud provider supports virtual host style (even MinIO) we have no plans on adding support for the deprecated path style feature.

3 лайка

This isn’t the first time I remember your stating that. Maybe add that to the OP and explicitly say that Oracle Object Storage isn’t supported until they support virtual host style.

3 лайка

The above explanation is reasonable, but it should be made clearer that any provider that is not using the Virtual Host Style standard is not supported.

Despite having this in some points it is not very clear.

I had to do some testing to find out.

1 лайк

Which service did you try that did not work? Then we can add it to the list in the start post.

3 лайка

I tried with Oracle Object Storage

They are still using “path style” and that’s why it didn’t work.

1 лайк

I just configured S3 backup using DigitalOcean Space. When I finished adding the information my * app.yml file and successfully running ./launcher rebuild app when I tried the rebake command, rake posts:rebake, I receive an error message that rake cannot be found.

Please help! I am stuck!

1 лайк

Before you enter the rake command you’d

 ./launcher enter app

You might do a rebuild html on a post from the UX first to make sure it’s working.

1 лайк

Thanks @pfaffman. I did run the command:

./launcher enter app

before I ran the rebake command.

You also said “You might do a rebuild html on a post from the UX first to make sure it’s working.”

I don’t know how to do this as I am new to Discourse. Would you mind providing me the steps to do this?

1 лайк

Since the guide here does not specify, after entering these details to app.yml, and running the necessary command, do I still need to configure the settings in Settings → File and Settings → Backup?

1 лайк

Hi Victor,
on your site, clicking on the three dots (the ellipsis) you’ll find the wrench and there rebuild html

3 лайка

No. Putting the settings in env variables overrides the ability to see it change then in the ux

1 лайк

Thanks, @Benjamin_D. I will do this shortly.

2 лайка

Thanks for your help.

I have successfully completed the S3 backup config (or so I think!). But when I run backup, it runs successfully.

However, my DigitalOcean Space bucket has no files in them!

1 лайк

Here is my configuration. I did not include my access and secret keys for obvious reasons!

  after_assets_precompile:
    - exec:
        cd: $home
        cmd:
          - sudo -E -u discourse bundle exec rake s3:upload_assets
DISCOURSE_USE_S3: true
DISCOURSE_S3_REGION: NYC3
DISCOURSE_S3_ENDPOINT: nyc3.digitaloceanspaces.com
DISCOURSE_S3_ACCESS_KEY_ID: myaccesskey
DISCOURSE_S3_SECRET_ACCESS_KEY: mysecretkey
DISCOURSE_S3_CDN_URL: https://community-cdn.itechguides.com
DISCOURSE_S3_BUCKET: itg-community-files
DISCOURSE_S3_BACKUP_BUCKET: itg-community-files/backups
DISCOURSE_BACKUP_LOCATION: s3
1 лайк

All of those DISCOURSE*: x lines go further up in the file in the section that starts with env:, like right under the SMTP stuff.

4 лайка

Wao! Let me move the files now and test.

Should I also move the script below?

after_assets_precompile:
- exec:
cd: $home
cmd:
- sudo -E -u discourse bundle exec rake s3:upload_assets

1 лайк

That section is its own stanza so it doesn’t matter where it goes (except in the middle of another one).

1 лайк

Thanks so much @pfaffman! I have just added those files in the relevant places and after rebuilding the container, my site is down displaying a blank page!