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

+ 1 - 0
docker-compose.prod.yml

@@ -24,6 +24,7 @@ services:
     restart: unless-stopped  # 添加自动重启策略
 
   nginx:
+    container_name: match-vote-nextjs-nginx-1
     image: nginx:alpine
     ports:
       - "8088:80"

+ 1 - 1
nginx/default.conf

@@ -4,7 +4,7 @@ server {
 
     # Proxy settings
     location / {
-        proxy_pass http://match-vote-nextjs-nextjs-1:3000;  # 使用完整的容器名称
+        proxy_pass http://nextjs:3000;
         proxy_http_version 1.1;
         proxy_set_header Upgrade $http_upgrade;
         proxy_set_header Connection 'upgrade';