2023-10-19 01:03:40 +02:00
|
|
|
FROM node:20-slim AS base
|
|
|
|
RUN corepack enable
|
|
|
|
COPY . /app
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
FROM base AS prod-deps
|
2023-10-19 01:16:49 +02:00
|
|
|
RUN pnpm install --prod --frozen-lockfile
|
2023-10-19 01:03:40 +02:00
|
|
|
|
|
|
|
FROM base AS build
|
2023-11-06 02:33:05 +01:00
|
|
|
|
|
|
|
ARG OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
|
|
ARG DREAM_API_KEY=${DREAM_API_KEY}
|
|
|
|
|
|
|
|
ARG S3_ENDPOINT_URL=${S3_ENDPOINT_URL}
|
|
|
|
ARG S3_BUCKET_NAME=${S3_BUCKET_NAME}
|
|
|
|
ARG S3_ACCESS_KEY=${S3_ACCESS_KEY}
|
|
|
|
ARG S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY}
|
2023-11-12 18:40:33 +01:00
|
|
|
ARG POCKETBASE_URL=${POCKETBASE_URL}
|
2023-11-06 02:33:05 +01:00
|
|
|
|
2023-10-19 01:16:49 +02:00
|
|
|
RUN pnpm install --frozen-lockfile
|
2023-10-19 01:03:40 +02:00
|
|
|
RUN pnpm run build
|
|
|
|
|
|
|
|
FROM base
|
|
|
|
COPY --from=prod-deps /app/node_modules /app/node_modules
|
|
|
|
COPY --from=build /app/build /app/build
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD [ "node", "build" ]
|