13 lines
486 B
Plaintext
13 lines
486 B
Plaintext
|
FROM node:20 AS strapi
|
||
|
WORKDIR /usr/src/app/
|
||
|
RUN corepack enable && corepack prepare pnpm@9.6.0 --activate
|
||
|
ENV PNPM_HOME="/pnpm"
|
||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||
|
COPY ./services/strapi/package.json ./services/strapi/pnpm-lock.yaml .
|
||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm fetch
|
||
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --prefer-offline
|
||
|
COPY ./services/strapi/ .
|
||
|
RUN ls -la .
|
||
|
RUN ["pnpm", "run", "build"]
|
||
|
CMD ["pnpm", "run", "develop"]
|