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