2024-04-08 23:48:05 +00:00
|
|
|
FROM node:20-alpine
|
|
|
|
# ENV PNPM_HOME="/pnpm"
|
|
|
|
# ENV PATH="$PNPM_HOME:$PATH"
|
2024-04-02 14:49:33 +00:00
|
|
|
RUN corepack enable
|
2024-04-08 18:23:31 +00:00
|
|
|
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev libc6-compat git nasm bash gcompat
|
2024-04-02 14:49:33 +00:00
|
|
|
WORKDIR /app
|
2024-04-08 18:23:31 +00:00
|
|
|
COPY pnpm-lock.yaml package.json ./
|
2024-04-08 23:48:05 +00:00
|
|
|
RUN pnpm install
|
2024-04-08 23:11:07 +00:00
|
|
|
ENV NODE_ENV=production
|
2024-04-02 14:49:33 +00:00
|
|
|
COPY ./packages/strapi .
|
|
|
|
RUN chown -R node:node /app
|
|
|
|
USER node
|
2024-04-08 22:25:35 +00:00
|
|
|
RUN pnpm run build
|
2024-04-08 18:23:31 +00:00
|
|
|
ENTRYPOINT ["pnpm"]
|
|
|
|
CMD ["run", "start"]
|