Browse Source

Add minio guide

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
pull/698/head
Sheogorath 3 years ago
parent
commit
a99467f006
No known key found for this signature in database GPG Key ID: 1F05CC3635CDDFFD
6 changed files with 83 additions and 0 deletions
  1. BIN
      docs/guides/images/minio-image-upload/create-bucket.png
  2. BIN
      docs/guides/images/minio-image-upload/create-policy.png
  3. BIN
      docs/guides/images/minio-image-upload/default-view.png
  4. BIN
      docs/guides/images/minio-image-upload/docker-logs.png
  5. BIN
      docs/guides/images/minio-image-upload/open-edit-policy.png
  6. +83
    -0
      docs/guides/minio-image-upload.md

BIN
docs/guides/images/minio-image-upload/create-bucket.png View File

Before After
Width: 959  |  Height: 686  |  Size: 15 KiB

BIN
docs/guides/images/minio-image-upload/create-policy.png View File

Before After
Width: 962  |  Height: 689  |  Size: 21 KiB

BIN
docs/guides/images/minio-image-upload/default-view.png View File

Before After
Width: 962  |  Height: 686  |  Size: 13 KiB

BIN
docs/guides/images/minio-image-upload/docker-logs.png View File

Before After
Width: 961  |  Height: 226  |  Size: 72 KiB

BIN
docs/guides/images/minio-image-upload/open-edit-policy.png View File

Before After
Width: 959  |  Height: 684  |  Size: 17 KiB

+ 83
- 0
docs/guides/minio-image-upload.md View File

@ -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"
}
```

Loading…
Cancel
Save