-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document how to set up MinIO in a development environment (#3857)
- Loading branch information
1 parent
dea3b5a
commit 5b60b4a
Showing
2 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
docs/src/pages/developers/how-to/development/blob-storage/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
layout: '@layouts/DevelopersLayout.astro' | ||
title: Set Up a Storage Provider | ||
--- | ||
|
||
# How to Set Up a Storage Provider for Development | ||
|
||
<p class="lead">When making changes to file storage in Aleph, it can be helpful to test changes against a real storage provider. This guide describes how to run the MinIO object storage provider in your local development environment and how to configure Aleph accordingly.</p> | ||
|
||
<Callout theme="danger">This guide describes how to set up MinIO in a development environment. If you want to configure a production Aleph instance to use a storage provider, please refer to [our operations guide](/developers/how-to/operations/blob-storage).</Callout> | ||
|
||
<Steps> | ||
<Step> | ||
Run the following command to start a single-node MinIO instance for development: | ||
|
||
```bash | ||
docker run -p "9000:9000" -p "9001:9001" quay.io/minio/minio minio server --console-address :9001 /mnt/data | ||
``` | ||
</Step> | ||
|
||
<Step> | ||
You can access the MinIO console at `http://localhost:9001`. Log in using the default credentials `minioadmin`/`minioadmin`. | ||
</Step> | ||
|
||
<Step> | ||
In order to create a new bucket, click on "Buckets" in the sidebar, then click on "Create Bucket". | ||
</Step> | ||
|
||
<Step> | ||
Enter `aleph-archive` as the bucket name and click on "Create Bucket". | ||
</Step> | ||
|
||
<Step> | ||
Set the following Aleph configuration options: | ||
|
||
| Configuration option | Value | | ||
| --- | --- | | ||
| ARCHIVE_TYPE | s3 | | ||
| ARCHIVE_BUCKET | aleph-archive | | ||
| ARCHIVE_ENDPOINT_URL | http://host.docker.internal:9000 | | ||
| AWS_ACCESS_KEY_ID | minioadmin | | ||
| AWS_SECRET_ACCESS_KEY | minioadmin | | ||
</Step> | ||
|
||
<Step> | ||
Restart Aleph. | ||
</Step> | ||
</Steps> | ||
|
||
<Callout> | ||
Usually, Docker Desktop automatically adds an entry in `/etc/hosts` to resolve `host.docker.internal`. If `host.docker.internal` can’t be resolved, you may need to manually add an entry to `/etc/hosts`: | ||
|
||
``` | ||
127.0.0.1 host.docker.internal | ||
``` | ||
</Callout> |