mirror of
https://github.com/cupcakearmy/docker-ddns-cloudflare.git
synced 2024-12-21 23:36:24 +00:00
24 lines
364 B
Docker
24 lines
364 B
Docker
FROM node:20-alpine as base
|
|
# PNPM
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
RUN corepack enable
|
|
# Setup
|
|
ENV CI=true
|
|
WORKDIR /app
|
|
ADD ./package.json ./pnpm-lock.yaml ./
|
|
|
|
|
|
FROM base as builder
|
|
RUN pnpm install
|
|
ADD . .
|
|
RUN pnpm run build
|
|
|
|
FROM base
|
|
RUN pnpm install --prod
|
|
COPY --from=builder /app/dist/ /app/dist/
|
|
|
|
STOPSIGNAL SIGTERM
|
|
|
|
CMD ["pnpm", "start"]
|