반응형
빌드
npm build
npm install; npm run build
Dockerfile
FROM node:20-alpine
COPY . /deploy
WORKDIR /deploy
EXPOSE 3000
ENTRYPOINT npm run start
이미지 빌드
docker build -t demo/nextjs-demo .
배포
docker-compose.yml
version: "3.3"
services:
nextjs-demo:
container_name: nextjs-demo
image: demo/nextjs-demo
ports:
- "3000:3000"
실행
docker-compose up -d
반응형
'Development > Nextjs' 카테고리의 다른 글
[Nextjs] SSR(Server Side Rendering) (0) | 2024.02.08 |
---|---|
[Nextjs] Router (0) | 2024.02.08 |
[Nextjs] Style (0) | 2024.02.08 |
[Nextjs] 프로젝트 생성하기 (0) | 2024.02.08 |