alexcdev1 5 months ago
parent
commit
bf10d5caf3
2 changed files with 2 additions and 3 deletions
  1. 1 2
      docker-compose.prod.yml
  2. 1 1
      nginx/default.conf

+ 1 - 2
docker-compose.prod.yml

@@ -15,7 +15,7 @@ services:
       - mongodb
     restart: unless-stopped  # 添加自动重启策略
     volumes:
-      - nextjs-uploads:/app/public/uploads  # 添加这行来挂载 uploads volume
+      - /www/wwwroot/match-vote-nextjs/app/public/uploads:/app/public/uploads  # 添加这行来挂载 uploads volume
 
   mongodb:
     image: mongo
@@ -36,7 +36,6 @@ services:
 
 volumes:
   mongodb_data:
-  nextjs-uploads:
 
 networks:
   default:

+ 1 - 1
nginx/default.conf

@@ -27,7 +27,7 @@ server {
     }
 
     location /uploads {
-        alias /app/public/uploads;
+        alias /www/wwwroot/match-vote-nextjs/app/public/uploads;
         expires 30d;
         add_header Cache-Control "public, max-age=2592000";
     }