Files
Senko-san 1b251869c4 initial
2026-06-08 12:49:45 +03:00

27 lines
850 B
YAML

# -- 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'
"