File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,13 @@ RUN npm install
99
1010# 이후 전체 파일 복사
1111COPY . .
12+
13+ # 동적 배포를 위한 빌드만 실행 (export 없이)
1214RUN npm run build
1315
1416# 빌드 결과물 확인
1517RUN ls -la /app
18+ RUN ls -la /app/.next || echo ".next 디렉토리가 없습니다"
1619
1720# 2단계: 실행 환경
1821FROM node:18
@@ -23,9 +26,8 @@ WORKDIR /app
2326COPY package*.json ./
2427RUN npm install --omit=dev
2528
26- # 빌드 결과물 위치 확인 후 복사 (.next 또는 out 디렉토리)
27- COPY --from=builder /app/.next ./.next || true
28- COPY --from=builder /app/out ./out || true
29+ # 빌드된 결과물 가져오기
30+ COPY --from=builder /app/.next ./.next
2931COPY --from=builder /app/public ./public
3032COPY --from=builder /app/node_modules ./node_modules
3133COPY --from=builder /app/package.json ./package.json
@@ -36,5 +38,5 @@ RUN ls -la /app
3638
3739EXPOSE 3000
3840
39- # package.json에 명시된 start 스크립트 실행
41+ # Next.js 서버 시작
4042CMD ["npm" , "run" , "start" ]
Original file line number Diff line number Diff line change 11/** @type {import('next').NextConfig } */
22const nextConfig = {
3- output : "export" ,
43 images : {
54 unoptimized : true ,
65 } ,
You can’t perform that action at this time.
0 commit comments