Skip to content

Commit

Permalink
build site
Browse files Browse the repository at this point in the history
  • Loading branch information
BookWyrm Bot authored and github-actions[bot] committed Jan 9, 2024
1 parent 80310db commit 55f6974
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion locale/en_US/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
20 changes: 17 additions & 3 deletions site/external-storage.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,18 @@ <h3>BookWyrm Settings</h3>
<li><code>AWS_ACCESS_KEY_ID</code>: your access key ID</li>
<li><code>AWS_SECRET_ACCESS_KEY</code>: your secret access key</li>
<li><code>AWS_STORAGE_BUCKET_NAME</code>: your bucket name</li>
<li><code>AWS_S3_REGION_NAME</code>: e.g. <code>"eu-west-1"</code> for AWS, <code>"fr-par"</code> for Scaleway or <code>"nyc3"</code> for Digital Ocean</li>
<li><code>AWS_S3_REGION_NAME</code>: e.g. <code>"eu-west-1"</code> for AWS, <code>"fr-par"</code> for Scaleway, <code>"nyc3"</code> for Digital Ocean or <code>"cluster-id"</code> for Linode</li>
</ul>
<p>If your S3-compatible service is Amazon AWS, you should be set. If not, you’ll have to uncomment the following lines:</p>
<ul>
<li><code>AWS_S3_CUSTOM_DOMAIN</code>: the domain that will serve the assets, e.g. <code>"example-bucket-name.s3.fr-par.scw.cloud"</code> or <code>"${AWS_STORAGE_BUCKET_NAME}.${AWS_S3_REGION_NAME}.digitaloceanspaces.com"</code></li>
<li><code>AWS_S3_ENDPOINT_URL</code>: the S3 API endpoint, e.g. <code>"https://s3.fr-par.scw.cloud"</code> or <code>"https://${AWS_S3_REGION_NAME}.digitaloceanspaces.com"</code></li>
<li><code>AWS_S3_CUSTOM_DOMAIN</code>: the domain that will serve the assets:</li>
<li>for Scaleway, e.g. <code>"example-bucket-name.s3.fr-par.scw.cloud"</code></li>
<li>for Digital Ocean, e.g. <code>"${AWS_STORAGE_BUCKET_NAME}.${AWS_S3_REGION_NAME}.digitaloceanspaces.com"</code></li>
<li>for Linode Object Storage, this should be set to the cluster domain, e.g. <code>"eu-central-1.linodeobjects.com"</code></li>
<li><code>AWS_S3_ENDPOINT_URL</code>: the S3 API endpoint:</li>
<li>for Scaleway, e.g. <code>"https://s3.fr-par.scw.cloud"</code></li>
<li>for Digital Ocean, e.g. <code>"https://${AWS_S3_REGION_NAME}.digitaloceanspaces.com"</code></li>
<li>For Linode Object Storage, set this to the cluster domain, e.g. <code>"https://eu-central-1.linodeobjects.com"</code></li>
</ul>
<h3>Copying local media to external storage</h3>
<p>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.</p>
Expand Down Expand Up @@ -276,6 +282,14 @@ <h4>CORS settings</h4>
</code></pre></div>

<p>No output means it should be good.</p>
<h3>Additional Step for Linode Object Storage Users</h3>
<p>For Linode, you now need to make an alteration to the <code>.env</code> 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 <code>AWS_S3_CUSTOM_DOMAIN</code>, for example if your <code>AWS_STORAGE_BUCKET_NAME</code> is <code>"my-bookwyrm-bucket"</code>, then set it to:</p>
<div class="highlight"><pre><span></span><code>AWS_S3_CUSTOM_DOMAIN=my-bookwyrm-bucket.cluster-id.linodeobjects.com
</code></pre></div>

<p><em>Note</em>: 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.</p>
<h3>New Instance</h3>
<p>If you are starting a new BookWyrm instance, you can go back to the setup instructions right now. If not, keep on reading.</p>
<h3>Restarting your instance</h3>
<p>Once the media migration has been done and the static assets are collected, you can load the new <code>.env</code> configuration and restart your instance with:</p>
Expand Down

0 comments on commit 55f6974

Please sign in to comment.