Toastie 4 years ago
parent
commit
fb8712f1d9
3 changed files with 55 additions and 0 deletions
  1. 11 0
      minio-mc/.env.template
  2. 34 0
      minio-mc/README.md
  3. 10 0
      minio-mc/docker-compose.yml

+ 11 - 0
minio-mc/.env.template

@@ -0,0 +1,11 @@
+# http or https
+protocol=https
+
+# S3_ENDPOINT
+tenant=example.ulm-store.de
+
+# AWS_ACCESS_KEY_ID
+key=example-TwelveChar
+
+# AWS_SECRET_ACCESS_KEY
+secret=30RandomAlphaNumericCharacters

+ 34 - 0
minio-mc/README.md

@@ -0,0 +1,34 @@
+# MioIO MC command line
+
+This convenient `docker-compose.yml` will set a your MinIO connection as per `.env` and make it available under the name `myminio` in the container.
+
+1. Setup your tenant / credentials
+```
+cp .env.template .env
+vi .env
+```
+
+2. Run the container as one-shot
+```
+docker-compose run minio-mc
+```
+
+3. Typical commands, for a full list see: https://docs.min.io/docs/minio-client-complete-guide.html
+```
+# buckets
+mc mb myminio/documents   # create
+mc ls myminio             # list
+
+# dealing with users
+mc admin user add myminio johndoe 30RandomAlphaNumericCharacters
+mc admin policy set myminio readwrite user=johndoe
+mc admin user list myminio
+mc admin user info myminio johndoe
+mc admin user remove myminio dominik_zino2
+
+# policies
+mc admin policy list myminio 
+mc admin policy info readonly
+mc admin policy info writeonly
+mc admin policy info readwrite
+```

+ 10 - 0
minio-mc/docker-compose.yml

@@ -0,0 +1,10 @@
+version: '2' 
+services:
+  minio-mc:
+    image: minio/mc 
+    container_name: minio-mc 
+    hostname: minio-mc
+    restart: none 
+    environment:
+      - MC_HOST_myminio=${protocol}://${key}:${secret}@${tenant}
+    entrypoint: /bin/sh