initial
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# -- built-in S3 (MinIO) + one-shot bucket creation ----------------------
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
restart: unless-stopped
|
||||
command: server /data --console-address ":9001"
|
||||
environment:
|
||||
MINIO_ROOT_USER: ${S3_ACCESS_KEY}
|
||||
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY}
|
||||
volumes:
|
||||
- miniodata:/data
|
||||
|
||||
# Waits for MinIO to accept connections, then creates the bucket. Runs once
|
||||
# (restart: no) and exits 0 — `compose up --wait` treats that as complete.
|
||||
minio-setup:
|
||||
image: minio/mc:latest
|
||||
restart: "no"
|
||||
depends_on:
|
||||
- minio
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
until mc alias set mcma http://minio:9000 ${S3_ACCESS_KEY} ${S3_SECRET_KEY}; do
|
||||
echo 'waiting for minio...'; sleep 2;
|
||||
done &&
|
||||
mc mb --ignore-existing mcma/${S3_BUCKET} &&
|
||||
echo 'bucket ready'
|
||||
"
|
||||
Reference in New Issue
Block a user