19 lines
457 B
Docker
19 lines
457 B
Docker
FROM node:20.15.1-alpine AS builder
|
|
RUN apk add --no-cache git
|
|
WORKDIR /app
|
|
COPY frontend/package.json frontend/yarn.lock ./
|
|
RUN yarn install --pure-lockfile
|
|
COPY frontend .
|
|
RUN yarn build
|
|
RUN npx next export -o out
|
|
|
|
FROM node:20.15.1-alpine
|
|
WORKDIR /app
|
|
COPY backend/package.json backend/yarn.lock ./
|
|
RUN yarn install --pure-lockfile
|
|
COPY backend .
|
|
COPY --from=builder /app/out /app/public
|
|
COPY --from=builder /app/build /app/public
|
|
CMD ["yarn", "start"]
|
|
|