summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSheogorath2018-01-23 11:47:47 +0100
committerSheogorath2018-01-23 11:48:00 +0100
commita99467f00622d0ce0a5c3d48b36bf6de8bbaab04 (patch)
tree99cfbca36d873c905156deb92323302f5a19929e
parenteec2318bda29f6633f9c9b4198e507959fa12d46 (diff)
Add minio guide
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
-rw-r--r--docs/guides/images/minio-image-upload/create-bucket.pngbin0 -> 15207 bytes
-rw-r--r--docs/guides/images/minio-image-upload/create-policy.pngbin0 -> 21156 bytes
-rw-r--r--docs/guides/images/minio-image-upload/default-view.pngbin0 -> 13061 bytes
-rw-r--r--docs/guides/images/minio-image-upload/docker-logs.pngbin0 -> 73263 bytes
-rw-r--r--docs/guides/images/minio-image-upload/open-edit-policy.pngbin0 -> 17514 bytes
-rw-r--r--docs/guides/minio-image-upload.md83
6 files changed, 83 insertions, 0 deletions
diff --git a/docs/guides/images/minio-image-upload/create-bucket.png b/docs/guides/images/minio-image-upload/create-bucket.png
new file mode 100644
index 00000000..ccfb6715
--- /dev/null
+++ b/docs/guides/images/minio-image-upload/create-bucket.png
Binary files differ
diff --git a/docs/guides/images/minio-image-upload/create-policy.png b/docs/guides/images/minio-image-upload/create-policy.png
new file mode 100644
index 00000000..f9cbd3bf
--- /dev/null
+++ b/docs/guides/images/minio-image-upload/create-policy.png
Binary files differ
diff --git a/docs/guides/images/minio-image-upload/default-view.png b/docs/guides/images/minio-image-upload/default-view.png
new file mode 100644
index 00000000..fadb50a4
--- /dev/null
+++ b/docs/guides/images/minio-image-upload/default-view.png
Binary files differ
diff --git a/docs/guides/images/minio-image-upload/docker-logs.png b/docs/guides/images/minio-image-upload/docker-logs.png
new file mode 100644
index 00000000..a25f349a
--- /dev/null
+++ b/docs/guides/images/minio-image-upload/docker-logs.png
Binary files differ
diff --git a/docs/guides/images/minio-image-upload/open-edit-policy.png b/docs/guides/images/minio-image-upload/open-edit-policy.png
new file mode 100644
index 00000000..1dac7bea
--- /dev/null
+++ b/docs/guides/images/minio-image-upload/open-edit-policy.png
Binary files differ
diff --git a/docs/guides/minio-image-upload.md b/docs/guides/minio-image-upload.md
new file mode 100644
index 00000000..273bd8eb
--- /dev/null
+++ b/docs/guides/minio-image-upload.md
@@ -0,0 +1,83 @@
+Minio Guide for HackMD
+===
+
+1. First of all you need to setup Minio itself.
+
+ Please refer to the [official Minio docs](https://docs.minio.io/) for an
+ production setup.
+
+ For checking it out and development purposes a non-persistent setup is enough:
+ ```console
+ docker run --name test-minio --rm -d -p 9000:9000 minio/minio server /data
+ ```
+
+ *Please notice this is not for productive use as all your data gets lost
+ when you stop this container*
+
+2. Next step is to get the credentials form the container:
+
+ ```
+ docker logs test-minio
+ ```
+
+ ![docker logs](images/minio-image-upload/docker-logs.png)
+
+3. Open http://localhost:9000 and login with the shown credentials.
+
+ ![minio default view](images/minio-image-upload/default-view.png)
+
+4. Create a bucket for HackMD
+
+ ![minio create bucket](images/minio-image-upload/create-bucket.png)
+
+5. Add a policy for the prefix `uploads` and make it read-only.
+
+ ![minio edit policy](images/minio-image-upload/open-edit-policy.png)
+ *Open policy editor*
+
+ ![minio policy adding](images/minio-image-upload/create-policy.png)
+ *Add policy for uploads*
+
+6. Set credentials and configs for Minio in HackMD's `config.json`
+
+ ```JSON
+ "minio": {
+ "accessKey": "888MXJ7EP4XXXXXXXXX",
+ "secretKey": "yQS2EbM1Y6IJrp/1BUKWq2/XXXXXXXXXXXXXXX",
+ "endPoint": "localhost",
+ "port": 9000,
+ "secure": false
+ }
+ ```
+ *You have to use different values for `endpoint` and `port` for a production
+ setup. Keep in mind the `endpoint`-address has to be public accessible from
+ your browser.*
+
+7. Set bucket name
+
+ ```JSON
+ "s3bucket": "hackmd"
+ ```
+
+8. Set upload type.
+
+ ```JSON
+ "imageUploadType": "minio"
+ ```
+
+9. Review your config.
+
+ ```json
+ {
+ // all your other config…
+ "minio": {
+ "accessKey": "888MXJ7EP4XXXXXXXXX",
+ "secretKey": "yQS2EbM1Y6IJrp/1BUKWq2/XXXXXXXXXXXXXXX",
+ "endPoint": "localhost",
+ "port": 9000,
+ "secure": false
+ },
+ "s3bucket": "hackmd",
+ "imageUploadType": "minio"
+ }
+ ```