diff --git a/Dockerfile b/Dockerfile index 52ae271..739b43f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM node:20-alpine AS base ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" ARG PORT +ENV PORT ${PORT} RUN corepack enable COPY . /app @@ -18,4 +19,4 @@ FROM base COPY --from=prod-deps /app/node_modules /app/node_modules COPY --from=build /app/ . EXPOSE ${PORT} -CMD [ "pnpm", "start" ] +CMD pnpm start -p ${PORT} diff --git a/Dockerfile.sandbox b/Dockerfile.sandbox deleted file mode 100644 index 739b43f..0000000 --- a/Dockerfile.sandbox +++ /dev/null @@ -1,22 +0,0 @@ -FROM node:20-alpine AS base -ENV PNPM_HOME="/pnpm" -ENV PATH="$PNPM_HOME:$PATH" -ARG PORT -ENV PORT ${PORT} - -RUN corepack enable -COPY . /app -WORKDIR /app - -FROM base AS prod-deps -RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile - -FROM base AS build -RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile -RUN pnpm run build - -FROM base -COPY --from=prod-deps /app/node_modules /app/node_modules -COPY --from=build /app/ . -EXPOSE ${PORT} -CMD pnpm start -p ${PORT}