From fbbd6734cb39a33805111e5463814c23ee68285e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Sat, 24 Jan 2026 10:59:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0minio=E7=9A=84=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E8=BD=AC=E5=8F=91=E5=92=8Cminio=E7=9A=84=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=8B=89=E8=B5=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/a_th_web/conf/nginx.conf | 12 ++++++++++++ docker/docker-compose.yml | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/docker/a_th_web/conf/nginx.conf b/docker/a_th_web/conf/nginx.conf index 8102642..5c1a9e8 100644 --- a/docker/a_th_web/conf/nginx.conf +++ b/docker/a_th_web/conf/nginx.conf @@ -28,6 +28,18 @@ http { proxy_pass http://ruoyi-gateway:8080/; } + location /minio/ { + proxy_set_header Host $http_host; + 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_connect_timeout 300; + proxy_http_version 1.1; + proxy_set_header Connection ""; + chunked_transfer_encoding off; + proxy_pass http://ruoyi-minio:9000/; + } + # 避免actuator暴露 if ($uri ~ "/actuator") { return 403; diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 66895c6..8dbc33b 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -52,6 +52,21 @@ services: volumes: - ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf command: redis-server /home/ruoyi/redis/redis.conf + ruoyi-minio: + container_name: ruoyi-minio + image: registry.t-aaron.com/minio/minio:RELEASE.2024-12-18T13-15-44Z + environment: + - MINIO_ROOT_USER=minioadmin + - MINIO_ROOT_PASSWORD=minioadmin + - TZ=Asia/Shanghai + ports: + - "9000:9000" + - "9001:9001" + volumes: + - ./minio/data:/data + - ./minio/config:/root/.minio + command: server /data --console-address ":9001" + restart: unless-stopped ruoyi-nginx: container_name: ruoyi-nginx image: nginx-runtime