Skip to content

Commit ebbbad2

Browse files
authored
Create Dockerfile
1 parent 5f6bd4d commit ebbbad2

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM node:14-alpine as deps
2+
3+
RUN apk add --no-cache libc6-compat
4+
WORKDIR /app
5+
COPY package.json yarn.lock ./
6+
COPY prisma prisma
7+
RUN yarn install --frozen-lockfile
8+
9+
FROM node:14-alpine as builder
10+
WORKDIR /app
11+
COPY . .
12+
COPY --from=deps /app/node_modules ./node_modules
13+
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
14+
15+
FROM node:14-alpine as runner
16+
WORKDIR /app
17+
ENV NODE_ENV production
18+
19+
COPY --from=builder /app/next.config.js ./
20+
COPY --from=builder /app/next-i18next.config.js ./
21+
COPY --from=builder /app/public ./public
22+
COPY --from=builder /app/.next ./.next
23+
COPY --from=builder /app/node_modules ./node_modules
24+
COPY --from=builder /app/package.json ./package.json
25+
COPY --from=builder /app/prisma ./prisma
26+
COPY scripts scripts
27+
EXPOSE 3000
28+
CMD ["/app/scripts/start.sh"]

0 commit comments

Comments
 (0)