From 6c02d8393a9376a3beeddac1a3988d4c7ba85656 Mon Sep 17 00:00:00 2001 From: murf Date: Wed, 15 Nov 2023 16:31:05 +0000 Subject: [PATCH 1/9] Adding notes on external storage settings for Linode Object Store, specifically the settings for the AWS_S3_CUSTOM_DOMAIN and AWS_S3_ENDPOINT_URL --- content/running_bookwyrm/external-storage.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/content/running_bookwyrm/external-storage.md b/content/running_bookwyrm/external-storage.md index e964a5ee..41c0b46a 100644 --- a/content/running_bookwyrm/external-storage.md +++ b/content/running_bookwyrm/external-storage.md @@ -38,12 +38,18 @@ Edit your `.env` file by uncommenting the following lines: - `AWS_ACCESS_KEY_ID`: your access key ID - `AWS_SECRET_ACCESS_KEY`: your secret access key - `AWS_STORAGE_BUCKET_NAME`: your bucket name -- `AWS_S3_REGION_NAME`: e.g. `"eu-west-1"` for AWS, `"fr-par"` for Scaleway or `"nyc3"` for Digital Ocean +- `AWS_S3_REGION_NAME`: e.g. `"eu-west-1"` for AWS, `"fr-par"` for Scaleway, `"nyc3"` for Digital Ocean or `"cluster-id"` for Linode If your S3-compatible service is Amazon AWS, you should be set. If not, you’ll have to uncomment the following lines: -- `AWS_S3_CUSTOM_DOMAIN`: the domain that will serve the assets, e.g. `"example-bucket-name.s3.fr-par.scw.cloud"` or `"${AWS_STORAGE_BUCKET_NAME}.${AWS_S3_REGION_NAME}.digitaloceanspaces.com"` -- `AWS_S3_ENDPOINT_URL`: the S3 API endpoint, e.g. `"https://s3.fr-par.scw.cloud"` or `"https://${AWS_S3_REGION_NAME}.digitaloceanspaces.com"` +- `AWS_S3_CUSTOM_DOMAIN`: the domain that will serve the assets: + - for Scaleway, e.g. `"example-bucket-name.s3.fr-par.scw.cloud"` + - for Digital Ocean, e.g. `"${AWS_STORAGE_BUCKET_NAME}.${AWS_S3_REGION_NAME}.digitaloceanspaces.com"` + - for Linode Object Storage, this should be set to the cluster domain, e.g. `"eu-central-1.linodeobjects.com"` +- `AWS_S3_ENDPOINT_URL`: the S3 API endpoint: + - for Scaleway, e.g. `"https://s3.fr-par.scw.cloud"` + - for Digital Ocean, e.g. `"https://${AWS_S3_REGION_NAME}.digitaloceanspaces.com"` + - For Linode Object Storage, set this to the cluster domain, e.g. `"https://eu-central-1.linodeobjects.com"` ### Copying local media to external storage From b70f08330bd7388527d41c49303ef45dc7ee946b Mon Sep 17 00:00:00 2001 From: murf Date: Thu, 16 Nov 2023 09:13:31 +0000 Subject: [PATCH 2/9] Adding notes on external storage settings for Linode Object Store, specifically the settings for the AWS_S3_CUSTOM_DOMAIN and AWS_S3_ENDPOINT_URL as per comment in https://github.com/bookwyrm-social/bookwyrm/issues/2323#issuecomment-1813994018 --- content/running_bookwyrm/external-storage.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/content/running_bookwyrm/external-storage.md b/content/running_bookwyrm/external-storage.md index 41c0b46a..a734644f 100644 --- a/content/running_bookwyrm/external-storage.md +++ b/content/running_bookwyrm/external-storage.md @@ -118,6 +118,19 @@ Then, run the following command: No output means it should be good. +### Additional Step for Linode Object Storage Users + +For Linode, you now need to make an alteration to the `.env` to ensure that the generated links to your storage objects are correct. If you miss this step, all the links to images and static files (like css) will be broken. +To fix this, you need to now insert the bucket-name into the `AWS_S3_CUSTOM_DOMAIN`, for example if your `AWS_STORAGE_BUCKET_NAME` is `"my-bookwyrm-bucket"`, then set it to: + +``` +AWS_S3_CUSTOM_DOMAIN=my-bookwyrm-bucket.cluster-id.linodeobjects.com +``` + +*Note*: From this point on, any bw-dev copy or sync commands will place objects into an incorrect location in your object store, so if you need to use them, revert to the previous setting, run and re-enable. + +### New Instance + If you are starting a new BookWyrm instance, you can go back to the setup instructions right now. If not, keep on reading. ### Restarting your instance From 55f69745c2a7f7da2127200d4c74f6728325916a Mon Sep 17 00:00:00 2001 From: BookWyrm Bot Date: Tue, 9 Jan 2024 03:07:44 +0000 Subject: [PATCH 3/9] build site --- locale/en_US/LC_MESSAGES/messages.po | 2 +- site/external-storage.html | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 70fdfdc4..854ae426 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-02 19:14+0000\n" +"POT-Creation-Date: 2024-01-09 03:07+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/site/external-storage.html b/site/external-storage.html index 9d55be37..02f1f187 100644 --- a/site/external-storage.html +++ b/site/external-storage.html @@ -224,12 +224,18 @@

BookWyrm Settings

  • AWS_ACCESS_KEY_ID: your access key ID
  • AWS_SECRET_ACCESS_KEY: your secret access key
  • AWS_STORAGE_BUCKET_NAME: your bucket name
  • -
  • AWS_S3_REGION_NAME: e.g. "eu-west-1" for AWS, "fr-par" for Scaleway or "nyc3" for Digital Ocean
  • +
  • AWS_S3_REGION_NAME: e.g. "eu-west-1" for AWS, "fr-par" for Scaleway, "nyc3" for Digital Ocean or "cluster-id" for Linode
  • If your S3-compatible service is Amazon AWS, you should be set. If not, you’ll have to uncomment the following lines:

      -
    • AWS_S3_CUSTOM_DOMAIN: the domain that will serve the assets, e.g. "example-bucket-name.s3.fr-par.scw.cloud" or "${AWS_STORAGE_BUCKET_NAME}.${AWS_S3_REGION_NAME}.digitaloceanspaces.com"
    • -
    • AWS_S3_ENDPOINT_URL: the S3 API endpoint, e.g. "https://s3.fr-par.scw.cloud" or "https://${AWS_S3_REGION_NAME}.digitaloceanspaces.com"
    • +
    • AWS_S3_CUSTOM_DOMAIN: the domain that will serve the assets:
    • +
    • for Scaleway, e.g. "example-bucket-name.s3.fr-par.scw.cloud"
    • +
    • for Digital Ocean, e.g. "${AWS_STORAGE_BUCKET_NAME}.${AWS_S3_REGION_NAME}.digitaloceanspaces.com"
    • +
    • for Linode Object Storage, this should be set to the cluster domain, e.g. "eu-central-1.linodeobjects.com"
    • +
    • AWS_S3_ENDPOINT_URL: the S3 API endpoint:
    • +
    • for Scaleway, e.g. "https://s3.fr-par.scw.cloud"
    • +
    • for Digital Ocean, e.g. "https://${AWS_S3_REGION_NAME}.digitaloceanspaces.com"
    • +
    • For Linode Object Storage, set this to the cluster domain, e.g. "https://eu-central-1.linodeobjects.com"

    Copying local media to external storage

    If your BookWyrm instance is already running and media have been uploaded (user avatars, book covers…), you will need to migrate uploaded media to your bucket.

    @@ -276,6 +282,14 @@

    CORS settings

    No output means it should be good.

    +

    Additional Step for Linode Object Storage Users

    +

    For Linode, you now need to make an alteration to the .env to ensure that the generated links to your storage objects are correct. If you miss this step, all the links to images and static files (like css) will be broken. +To fix this, you need to now insert the bucket-name into the AWS_S3_CUSTOM_DOMAIN, for example if your AWS_STORAGE_BUCKET_NAME is "my-bookwyrm-bucket", then set it to:

    +
    AWS_S3_CUSTOM_DOMAIN=my-bookwyrm-bucket.cluster-id.linodeobjects.com
    +
    + +

    Note: From this point on, any bw-dev copy or sync commands will place objects into an incorrect location in your object store, so if you need to use them, revert to the previous setting, run and re-enable.

    +

    New Instance

    If you are starting a new BookWyrm instance, you can go back to the setup instructions right now. If not, keep on reading.

    Restarting your instance

    Once the media migration has been done and the static assets are collected, you can load the new .env configuration and restart your instance with:

    From 3a09cc9fef4c724c2dba8102976b6c4a96ff519f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 18:48:26 +0000 Subject: [PATCH 4/9] Bump jinja2 from 3.0.1 to 3.1.3 Bumps [jinja2](https://github.com/pallets/jinja) from 3.0.1 to 3.1.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.0.1...3.1.3) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 073aba07..c1d15aa3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ black==22.12.0 -Jinja2==3.0.1 +Jinja2==3.1.3 Markdown==3.3.4 PyYAML==6.0 pygments==2.16.1 \ No newline at end of file From d82dd25a961d07bf1ce4b7a538c0348acaf9cdfd Mon Sep 17 00:00:00 2001 From: BookWyrm Bot Date: Thu, 11 Jan 2024 22:53:52 +0000 Subject: [PATCH 5/9] build site --- locale/en_US/LC_MESSAGES/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 854ae426..f7f762aa 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-09 03:07+0000\n" +"POT-Creation-Date: 2024-01-11 22:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From b9fac244f1e454b2103009b8b1192f6431c18d9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:43:18 +0000 Subject: [PATCH 6/9] Bump black from 22.12.0 to 24.3.0 Bumps [black](https://github.com/psf/black) from 22.12.0 to 24.3.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/22.12.0...24.3.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c1d15aa3..e74e7b9c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -black==22.12.0 +black==24.3.0 Jinja2==3.1.3 Markdown==3.3.4 PyYAML==6.0 From eb1e4c67454262bed350a191b141e001cc7bae40 Mon Sep 17 00:00:00 2001 From: BookWyrm Bot Date: Sat, 23 Mar 2024 15:17:10 +0000 Subject: [PATCH 7/9] build site --- locale/en_US/LC_MESSAGES/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index f7f762aa..83583200 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-11 22:53+0000\n" +"POT-Creation-Date: 2024-03-23 15:17+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" From c04335c75c59560098671b84aef0ccfc5db9a570 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 20:41:45 +0000 Subject: [PATCH 8/9] Bump jinja2 from 3.1.3 to 3.1.4 Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e74e7b9c..071a1876 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ black==24.3.0 -Jinja2==3.1.3 +Jinja2==3.1.4 Markdown==3.3.4 PyYAML==6.0 pygments==2.16.1 \ No newline at end of file From 1f6613e0de15b2ed2b817ad59e33c350a3c01aa8 Mon Sep 17 00:00:00 2001 From: BookWyrm Bot Date: Tue, 7 May 2024 03:00:55 +0000 Subject: [PATCH 9/9] build site --- locale/en_US/LC_MESSAGES/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po index 83583200..7830a052 100644 --- a/locale/en_US/LC_MESSAGES/messages.po +++ b/locale/en_US/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-23 15:17+0000\n" +"POT-Creation-Date: 2024-05-07 03:00+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n"