Storage provider
colis with MinIO
One Docker command, and the whole delivery flow runs on your laptop.
import { createBucket } from '@colis/core'
const store = createBucket({
bucket: 'transfers',
endpoint: 'http://localhost:9000',
credentials: { accessKeyId: 'minioadmin', secretAccessKey: 'minioadmin' },
})Why this one
MinIO
A local MinIO is the cheapest way to try colis for real: the same PutObject with the same conditional headers, no account to create and no network to wait on. The delivery page’s .env.example has a block for it.
From the command line
A starter configuration, and what is left to do.
init writes the file with ${VAR} references rather than secrets, so it is meant to be committed; the env file it points at is not.
{
"bucket": "transfers",
"endpoint": "http://localhost:9000",
"forcePathStyle": true,
"prefix": "transfers",
"expiresIn": "1h",
"credentials": { "accessKeyId": "minioadmin", "secretAccessKey": "minioadmin" }
}Then
- 01docker run -p 9000:9000 -p 9001:9001 -e MINIO_ROOT_USER=minioadmin -e MINIO_ROOT_PASSWORD=minioadmin quay.io/minio/minio server /data --console-address ":9001"
- 02Create the bucket from the console on http://localhost:9001.
- 03Run
colis verifier. It performs the operations colis needs and reports what happened.
Worth knowing
Notes on MinIO.
Path-style addressing
Self-hosted gateways require https://endpoint/bucket/key. Setting an endpoint turns it on; the starter configuration writes it explicitly so the intent is visible.
Self-hosted in production too
The same configuration, with real credentials and TLS, runs against a MinIO cluster or any gateway that implements conditional PutObject. colis verifier tells you whether yours does.
Expiry cleanup
The expiry stops a parcel being handed over; only a lifecycle rule deletes the object. Give the prefix a rule that expires objects after a day or two, and colis verifier turns green.
Other providers
The endpoint is the only difference.
Send it. They sign off. You know.
Your storage, a delivery page under your name, a webhook at every step. Nothing hosted by someone else.