docker: hopefully fix dockerfile

This commit is contained in:
Xylight committed 2024-02-10 14:12:26 -08:00
1 parent 5d271b1325
commit da0370112d
1 file changed
+13 -6
+13 -6
View File
@@ -1,17 +1,24 @@
FROM oven/bun:alpine FROM node:20-alpine AS builder
WORKDIR /app WORKDIR /app
COPY package.json ./ COPY package.json ./
RUN bun install RUN npm install
EXPOSE 3000
COPY . . 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 USER bun
CMD ["bun", "run", "bunstart"] CMD ["bun", "/app/build/index.js"]