Skip to content

Commit 8bae2bd

Browse files
authored
Merge pull request #68 from GDSCINHA/develop
fix: 정적 배포 삭제
2 parents 92c427d + 3c06dce commit 8bae2bd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ RUN npm install
99

1010
# 이후 전체 파일 복사
1111
COPY . .
12+
13+
# 동적 배포를 위한 빌드만 실행 (export 없이)
1214
RUN npm run build
1315

1416
# 빌드 결과물 확인
1517
RUN ls -la /app
18+
RUN ls -la /app/.next || echo ".next 디렉토리가 없습니다"
1619

1720
# 2단계: 실행 환경
1821
FROM node:18
@@ -23,9 +26,8 @@ WORKDIR /app
2326
COPY package*.json ./
2427
RUN 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
2931
COPY --from=builder /app/public ./public
3032
COPY --from=builder /app/node_modules ./node_modules
3133
COPY --from=builder /app/package.json ./package.json
@@ -36,5 +38,5 @@ RUN ls -la /app
3638

3739
EXPOSE 3000
3840

39-
# package.json에 명시된 start 스크립트 실행
41+
# Next.js 서버 시작
4042
CMD ["npm", "run", "start"]

next.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
3-
output: "export",
43
images: {
54
unoptimized: true,
65
},

0 commit comments

Comments
 (0)