]> Nutra Git (v1) - nutratech/vps-root.git/commitdiff
mino poc
authornutra-bot <nutradigest@gmail.com>
Sun, 14 May 2023 18:03:43 +0000 (18:03 +0000)
committernutra-bot <nutradigest@gmail.com>
Sun, 14 May 2023 18:03:43 +0000 (18:03 +0000)
etc/default/minio [new file with mode: 0644]
etc/nginx/conf.d/default.conf
etc/systemd/system/minio.service [new file with mode: 0644]

diff --git a/etc/default/minio b/etc/default/minio
new file mode 100644 (file)
index 0000000..1bc1dc4
--- /dev/null
@@ -0,0 +1,5 @@
+MINIO_VOLUMES="/mnt/data"
+#MINIO_OPTS="--certs-dir /home/sammy/.minio/certs --console-address :9001"
+MINIO_OPTS="--address :9001 --console-address :9002"
+MINIO_ROOT_USER=minioadmin
+MINIO_ROOT_PASSWORD=F3wNKjbL
index 114a3747894ea25820b94bb1de218f6b157d04c7..ddde54a9564e8a4403a49b9e48049c8fffbebefc 100644 (file)
@@ -54,6 +54,37 @@ server {
   }
 }
 
+# MinIO (file server for MedusaJS)
+server {
+  server_name s3.nutra.tk;
+  #listen 80;
+  listen 443 ssl http2;
+  location / {
+    # To support websocket
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "upgrade";
+    proxy_set_header Host            $host;
+    proxy_set_header X-Forwarded-For $remote_addr;
+    proxy_pass http://localhost:9001;
+    # proxy_pass http://minio;
+  }
+}
+
+# MinIO Console
+server {
+  server_name s3-admin.nutra.tk;
+  #listen 80;
+  listen 443 ssl http2;
+  location / {
+    # To support websocket
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "upgrade";
+    proxy_pass http://localhost:9002;
+  }
+}
+
 # UI, blog, favicon, default server
 server {
   server_name dev.nutra.tk;
diff --git a/etc/systemd/system/minio.service b/etc/systemd/system/minio.service
new file mode 100644 (file)
index 0000000..d63a300
--- /dev/null
@@ -0,0 +1,37 @@
+[Unit]
+Description=MinIO
+Documentation=https://docs.min.io
+Wants=network-online.target
+After=network-online.target
+AssertFileIsExecutable=/usr/local/bin/minio
+
+[Service]
+Type=notify
+
+WorkingDirectory=/usr/local
+
+User=minio-user
+Group=minio-user
+ProtectProc=invisible
+
+EnvironmentFile=-/etc/default/minio
+ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"
+ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
+
+# Let systemd restart this service always
+Restart=always
+
+# Specifies the maximum file descriptor number that can be opened by this process
+LimitNOFILE=1048576
+
+# Specifies the maximum number of threads this process can create
+TasksMax=infinity
+
+# Disable timeout logic and wait until process is stopped
+TimeoutStopSec=infinity
+SendSIGKILL=no
+
+[Install]
+WantedBy=multi-user.target
+
+# Built for ${project.name}-${project.version} (${project.name})