From 94e2fb4777ac80889aa73961aebe3910841e7037 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Mon, 15 Jan 2024 19:21:34 +0100
Subject: [PATCH] docs(minio): Add description and some details

---
 docs/src/SUMMARY.md    |  1 +
 docs/src/apps/minio.md | 60 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 docs/src/apps/minio.md

diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md
index fb63c195a..e0037fcb5 100644
--- a/docs/src/SUMMARY.md
+++ b/docs/src/SUMMARY.md
@@ -16,6 +16,7 @@
   - [Blog](apps/blog.md)
   - [Keycloak](apps/keycloak.md)
   - [Mastodon](apps/mastodon.md)
+  - [Minio](apps/minio.md)
 - [Infrastructure Components](components/README.md)
   - [calico](components/calico.md)
   - [cert-manager](components/cert-manager.md)
diff --git a/docs/src/apps/minio.md b/docs/src/apps/minio.md
new file mode 100644
index 000000000..1f210591a
--- /dev/null
+++ b/docs/src/apps/minio.md
@@ -0,0 +1,60 @@
+# Minio
+
+Minio provides S3-compatible object storage for all kinds of things. It's deployed on the [NAS](../hardware/nas.md) and stores bulk storage.
+
+<iframe width="100%" height="480" src="https://www.youtube-nocookie.com/embed/m0suyfBuaDg" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
+
+
+## Static Webhosting
+
+Static webhosting is achived by building a webpage that links to full filenames like `example.html` as part of the URL.
+
+Ingress-nginx is configured to handle the domain:
+
+```yaml
+apiVersion: v1
+kind: Service
+metadata:
+    name: s3
+spec:
+    type: ExternalName
+    externalName: nas.example.net
+    ports:
+        - port: 9000
+          name: https
+          protocol: TCP
+
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+    name: example
+    annotations:
+        nginx.ingress.kubernetes.io/backend-protocol: HTTPS
+        nginx.ingress.kubernetes.io/app-root: /index.html
+        nginx.ingress.kubernetes.io/rewrite-target: /example/$1
+spec:
+    rules:
+        - host: example.com
+          http:
+            paths:
+                - path: /(.*)
+                  pathType: Prefix
+                  backend:
+                    service:
+                        name: s3
+                        port:
+                            number: 9000
+    tls:
+        - hosts:
+            - example.com
+          secretName: example-tls
+```
+
+Finally a bucket `example` is created and the website is copied inside:
+
+```bash
+mc alias set minio https://nas.example.net:9000 example-access-key example-access-secret
+mc mirror --remove --overwrite ./ minio/example
+```
+
-- 
GitLab