|
@@ -5,12 +5,12 @@ services:
|
|
context: .
|
|
context: .
|
|
dockerfile: Dockerfile.prod
|
|
dockerfile: Dockerfile.prod
|
|
args:
|
|
args:
|
|
- - MONGODB_URI=mongodb://mongodb:27017/mydatabase
|
|
|
|
|
|
+ - MONGODB_URI=mongodb://mongodb:27017/lvyin_db
|
|
ports:
|
|
ports:
|
|
- "3000:3000"
|
|
- "3000:3000"
|
|
environment:
|
|
environment:
|
|
- NODE_ENV=production
|
|
- NODE_ENV=production
|
|
- - MONGODB_URI=mongodb://mongodb:27017/mydatabase
|
|
|
|
|
|
+ - MONGODB_URI=mongodb://mongodb:27017/lvyin_db
|
|
depends_on:
|
|
depends_on:
|
|
- mongodb
|
|
- mongodb
|
|
restart: unless-stopped # 添加自动重启策略
|
|
restart: unless-stopped # 添加自动重启策略
|
|
@@ -27,8 +27,8 @@ services:
|
|
container_name: match-vote-nextjs-nginx-1
|
|
container_name: match-vote-nextjs-nginx-1
|
|
image: nginx:alpine
|
|
image: nginx:alpine
|
|
ports:
|
|
ports:
|
|
- - "8080:80"
|
|
|
|
-
|
|
|
|
|
|
+ - "8081:80"
|
|
|
|
+
|
|
volumes:
|
|
volumes:
|
|
- ./nginx:/etc/nginx/conf.d
|
|
- ./nginx:/etc/nginx/conf.d
|
|
- ./logs/nginx:/var/log/nginx
|
|
- ./logs/nginx:/var/log/nginx
|