#!/bin/sh # Creates the buckets each service expects. MinIO does not create them on # demand: file-storage reports a generic 500 on upload if its bucket is # missing, and the h5p library job fails halfway through. set -eu mc alias set local http://minio:9000 miniouser miniouser for bucket in \ schulcloud ` # files-storage (the /api/v3/file API)` \ h5p-content-bucket ` # h5p-editor content` \ h5p-library-bucket ` # h5p content types` \ ydocs ` # tldraw whiteboard documents` \ fwu-content ` # FWU media, unused but cheap to create` \ bucket-5f2987e020834114b8efd6f6 # legacy file manager, demo school (see below) do mc mb --ignore-existing "local/$bucket" done # The legacy file manager keeps one bucket per school, "bucket-", and # creates it on first upload — then calls PutBucketCors, which MinIO does not # implement, so the first upload fails with "A header you provided implies # functionality that is not implemented". A bucket that already exists skips # both calls. 5f2987e020834114b8efd6f6 is the demo school's fixed seed id. mc ls local