From 6e823743fc812071ee63f1ef9cfee523c0acf6f8 Mon Sep 17 00:00:00 2001 From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com> Date: Thu, 8 Jan 2026 15:30:20 +0100 Subject: [PATCH] feat: add Dockerfile for documentation service Introduce a multi-stage Dockerfile for the documentation service to enable efficient builds and optimized runtime with Node.js 22. --- documentation/Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 documentation/Dockerfile diff --git a/documentation/Dockerfile b/documentation/Dockerfile new file mode 100644 index 0000000..431813f --- /dev/null +++ b/documentation/Dockerfile @@ -0,0 +1,22 @@ +FROM node:22-slim AS base +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable + +FROM base AS build +WORKDIR /usr/src/app +COPY . . +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile +RUN pnpm run --filter @memegoat/documentation build + +FROM base AS runtime +WORKDIR /app +COPY --from=build /usr/src/app/documentation/public ./documentation/public +COPY --from=build /usr/src/app/documentation/.next/standalone ./ +COPY --from=build /usr/src/app/documentation/.next/static ./documentation/.next/static + +EXPOSE 3000 +ENV PORT=3000 +ENV HOSTNAME="0.0.0.0" + +CMD ["node", "documentation/server.js"]