!refactor: replace node with bun (#3)
Reviewed-on: #3 Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
This commit was merged in pull request #3.
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,13 +1,23 @@
|
||||
FROM node:18.12-slim
|
||||
FROM oven/bun:1.1.42 AS base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ["package.json", "package-lock.json", "./"]
|
||||
FROM base AS install
|
||||
RUN mkdir -p /temp/dev
|
||||
COPY package.json bun.lockb /temp/dev/
|
||||
RUN cd /temp/dev && bun install --frozen-lockfile
|
||||
|
||||
RUN npm install
|
||||
RUN mkdir -p /temp/prod
|
||||
COPY package.json bun.lockb /temp/prod/
|
||||
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
||||
|
||||
FROM base AS build
|
||||
COPY --from=install /temp/dev/node_modules node_modules
|
||||
COPY . .
|
||||
RUN bun run build
|
||||
|
||||
RUN npm run build
|
||||
FROM base as release
|
||||
COPY --from=install /temp/prod/node_modules node_modules
|
||||
COPY --from=build /app/dist .
|
||||
|
||||
CMD [ "node", "dist/app.js"]
|
||||
CMD [ "node", "/app/app.js"]
|
||||
Reference in New Issue
Block a user