feat: pipeline and dockerize

This commit is contained in:
u80864958
2025-10-21 08:23:47 +02:00
parent 02918feca1
commit 0f2dee09d6
5 changed files with 148 additions and 1 deletions

34
Dockerfile Normal file
View File

@@ -0,0 +1,34 @@
FROM node:24-trixie AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
# RUN apt-get update && \
# apt-get install -y python3 build-essential
ENV CI=true
ENV npm_config_build_from_source=true
WORKDIR /app
COPY ./package.json ./
COPY ./pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
FROM base AS build
COPY . /app
ENV DATABASE_URL=build.db
RUN pnpm run build
FROM base
WORKDIR /app
COPY --from=build /app/build .
EXPOSE 3000
CMD [ "node", "index.js" ]