~xenrox/ansible

cf86009aa933e99d8995e4b2a80447fe82ceb14e — Thorben Günther 10 months ago a95fc03
minio: Expose console

Closes: https://todo.xenrox.net/~xenrox/infrastructure/13
3 files changed, 43 insertions(+), 2 deletions(-)

M roles/minio/files/minio.conf
M roles/minio/templates/minio.conf.j2
M terraform_hetzner/locals.tf
M roles/minio/files/minio.conf => roles/minio/files/minio.conf +41 -0
@@ 29,3 29,44 @@ server {
        proxy_pass http://127.0.0.1:9001;
    }
}

server {
    include /etc/nginx/snippets/http.conf;
    server_name minioconsole.xenrox.net;
}

server {
    include /etc/nginx/snippets/https.conf;
    server_name minioconsole.xenrox.net;

    client_max_body_size 5000M;
    # To allow special characters in headers
    ignore_invalid_headers off;
    # To disable buffering
    proxy_buffering off;
    proxy_request_buffering off;

    location / {
        include /etc/nginx/snippets/internal_access.conf;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        # This is necessary to pass the correct IP to be hashed
        real_ip_header X-Real-IP;

        proxy_connect_timeout 300;

        # To support websockets in MinIO versions released after January 2023
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        chunked_transfer_encoding off;

        proxy_pass http://127.0.0.1:35957;
    }
}

M roles/minio/templates/minio.conf.j2 => roles/minio/templates/minio.conf.j2 +1 -1
@@ 5,7 5,7 @@ MINIO_ROOT_USER={{ minio_secrets['access_key'] }}
# Server password.
MINIO_ROOT_PASSWORD={{ minio_secrets['secret_key'] }}
# Use if you want to run Minio on a custom port.
MINIO_OPTS="--address 127.0.0.1:9001"
MINIO_OPTS="--address 127.0.0.1:9001 --console-address 127.0.0.1:35957"
# Prometheus metrics with auth
MINIO_PROMETHEUS_AUTH_TYPE="jwt"
# Support DNS bucket lookup

M terraform_hetzner/locals.tf => terraform_hetzner/locals.tf +1 -1
@@ 18,7 18,7 @@ locals {
    "cloud", "grafana", "keycloak", "tube", "vault", "matrix", "hedgedoc",

    # minio
    "minio", "tube.minio",
    "minio", "minioconsole", "tube.minio",

    "bot", "faceit", "gamja", "pass", "search",