charles_c il y a 5 mois
Parent
commit
e290a51b64
2 fichiers modifiés avec 2 ajouts et 3 suppressions
  1. 1 2
      docker-compose.prod.yml
  2. 1 1
      nginx/default.conf

+ 1 - 2
docker-compose.prod.yml

@@ -15,7 +15,6 @@ services:
       - mongodb
     restart: unless-stopped  # 添加自动重启策略
     volumes:
-      # - nextjs-uploads:/app/public/uploads
       - uploads_data:/app/public/uploads
     
   mongodb:
@@ -32,7 +31,7 @@ services:
     volumes:
       - ./nginx:/etc/nginx/conf.d
       - ./logs/nginx:/var/log/nginx
-      - ./public/uploads:/app/public/uploads:ro
+      - uploads_data:/app/public/uploads:ro
     depends_on:
       - nextjs
     restart: unless-stopped  # 添加自动重启策略

+ 1 - 1
nginx/default.conf

@@ -23,9 +23,9 @@ server {
     location /uploads {
         alias /app/public/uploads;
         try_files $uri $uri/ =404;
+        add_header X-Debug-Message "$document_root$uri" always;
     }
 
-
     # 添加健康检查路由
     location /health {
         access_log off;