Skip to content

Instantly share code, notes, and snippets.

@haxoza
Created July 24, 2019 11:11
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haxoza/22afe7cc4a9da7e8bdc09aad393a99cc to your computer and use it in GitHub Desktop.
Save haxoza/22afe7cc4a9da7e8bdc09aad393a99cc to your computer and use it in GitHub Desktop.
Local S3 with Minio and created bucket on startup
version: '3'
services:
minio:
image: minio/minio:RELEASE.2019-07-17T22-54-12Z
volumes:
- data:/data
ports:
- "9000:9000"
networks:
- minio
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server /data
create_buckets:
image: minio/mc:RELEASE.2019-07-17T22-13-42Z
depends_on:
- minio
networks:
- minio
entrypoint: >
/bin/sh -c '
sleep 5;
/usr/bin/mc config host add s3 http://minio:9000 minio minio123 --api S3v4;
[[ ! -z "`/usr/bin/mc ls s3 | grep challenge`" ]] || /usr/bin/mc mb s3/challenge;
/usr/bin/mc policy download s3/challenge;
exit 0;
'
volumes:
data:
networks:
minio:
@medeirosinacio
Copy link

praise the sun ☀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment