diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..61dbbef8de --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +pnpm-lock.yaml +.git +.gitignore +dist \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000000..bb6821262f --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,17 @@ +FROM node:21-slim AS base +ENV PNPM_HOME="/pnpm" +ENV PATH="$PNPM_HOME:$PATH" +RUN corepack enable +COPY . /app +WORKDIR /app + +FROM base AS prod-deps +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod + +FROM base AS build +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install +RUN pnpm run build + +FROM httpd:2.4 AS runtime +COPY --from=build /app/dist /usr/local/apache2/htdocs/ +EXPOSE 80 \ No newline at end of file