Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Sion99 authored Apr 4, 2024
1 parent 72ef74b commit b41305e
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
# --------
# Build Stage
FROM node:21-slim AS builder
FROM node:21-slim

WORKDIR /app

# ๋จผ์ € aeye ๋””๋ ‰ํ† ๋ฆฌ ๋‚ด์˜ ํŒŒ์ผ๋“ค์„ ๋ณต์‚ฌ
COPY aeye/package.json aeye/package-lock.json ./
# aeye ๋””๋ ‰ํ† ๋ฆฌ ๋‚ด์˜ ๋ชจ๋“  ํŒŒ์ผ ๋ฐ ํด๋” ๋ณต์‚ฌ
COPY aeye/ .

# ์˜์กด์„ฑ ์„ค์น˜
RUN npm ci

# ๋‚˜๋จธ์ง€ ํŒŒ์ผ ๋ณต์‚ฌ
COPY aeye/ .

# ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋นŒ๋“œ
RUN npm run build

# --------
# Deployment Stage
FROM node:21-slim

WORKDIR /app

# ๋นŒ๋“œ๋œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜๊ณผ ํ•„์š”ํ•œ ํŒŒ์ผ๋“ค์„ ๋ณต์‚ฌ
COPY --from=builder /app/next.config.mjs ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules

# ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์‹คํ–‰
CMD ["npm", "start"]

0 comments on commit b41305e

Please sign in to comment.