From da0370112dce2bc8d900fdc3bac1b596a2140f5a Mon Sep 17 00:00:00 2001 From: Xylight Date: Sat, 10 Feb 2024 14:12:26 -0800 Subject: [PATCH] docker: hopefully fix dockerfile --- Dockerfile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index dfa45a94..7df79c03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,24 @@ -FROM oven/bun:alpine +FROM node:20-alpine AS builder WORKDIR /app COPY package.json ./ -RUN bun install - -EXPOSE 3000 +RUN npm install COPY . . -RUN ADAPTER=bun bun run build +RUN ADAPTER=bun npm run build + +FROM oven/bun:alpine + +WORKDIR /app + +COPY --from=builder /app/node_modules /app/node_modules +COPY --from=builder /app/build /app/build + +EXPOSE 3000 USER bun -CMD ["bun", "run", "bunstart"] +CMD ["bun", "/app/build/index.js"]