18 lines
465 B
Docker
18 lines
465 B
Docker
FROM node:18-alpine3.18 AS build
|
|
WORKDIR /app
|
|
RUN apk add --no-cache git python3 make g++
|
|
COPY . .
|
|
RUN git init -q \
|
|
&& npm config set registry https://registry.npmmirror.com \
|
|
&& npm install -g pnpm@8.15.9 --registry=https://registry.npmmirror.com \
|
|
&& pnpm install --no-frozen-lockfile
|
|
RUN pnpm build
|
|
|
|
FROM node:20-alpine
|
|
WORKDIR /app
|
|
COPY --from=build /app/dist ./dist
|
|
COPY server ./server
|
|
ENV TEMPLATE_DIR=/app/data
|
|
EXPOSE 80
|
|
CMD ["node", "server/index.js"]
|