How to Set Up a Storage Provider for Development
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.
-
Run the following command to start a single-node MinIO instance for development:
docker run -p "9000:9000" -p "9001:9001" quay.io/minio/minio minio server --console-address :9001 /mnt/data
-
You can access the MinIO console at
http://localhost:9001
. Log in using the default credentialsminioadmin
/minioadmin
. -
In order to create a new bucket, click on “Buckets” in the sidebar, then click on “Create Bucket”.
-
Enter
aleph-archive
as the bucket name and click on “Create Bucket”. -
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 -
Restart Aleph.
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