dont use multistage

This commit is contained in:
Chris Grimmett 2024-04-08 13:45:49 -08:00
parent d72ea5814e
commit f4c507d429
1 changed files with 3 additions and 5 deletions

View File

@ -7,7 +7,6 @@ RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev l
WORKDIR /app WORKDIR /app
FROM base AS builder
COPY pnpm-lock.yaml package.json ./ COPY pnpm-lock.yaml package.json ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
COPY ./packages/strapi . COPY ./packages/strapi .
@ -16,11 +15,10 @@ RUN chown -R node:node /app
USER node USER node
FROM builder AS dev # FROM builder AS dev
ENV NODE_ENV=development # ENV NODE_ENV=development
CMD ["pnpm", "run", "dev"] # CMD ["pnpm", "run", "dev"]
FROM builder AS release
ENV NODE_ENV=production ENV NODE_ENV=production
ENTRYPOINT ["pnpm"] ENTRYPOINT ["pnpm"]
CMD ["run", "start"] CMD ["run", "start"]