+12
-18
Dockerfile
+12
-18
Dockerfile
···
1
-
FROM oven/bun:alpine AS install
1
+
FROM node:lts-alpine AS baseimg
2
2
3
-
WORKDIR /usr/src/app
3
+
FROM baseimg AS build-env
4
+
WORKDIR /build
4
5
5
-
COPY package*.json ./
6
-
COPY bun.lockb ./
7
-
8
-
ENV NPM_CONFIG_LOGLEVEL warn
9
-
RUN bun install --production --no-progress
10
-
6
+
COPY ./package*json ./
7
+
RUN npm ci
11
8
COPY . .
9
+
RUN npm ci --only=production --omit=dev
12
10
13
-
FROM oven/bun:alpine
14
11
12
+
FROM baseimg AS deploy
13
+
WORKDIR /usr/src/app
15
14
HEALTHCHECK --timeout=3s \
16
15
CMD curl --fail http://localhost:8080/healthcheck || exit 1
17
16
RUN apk add --no-cache curl
18
-
19
-
WORKDIR /usr/src/app
17
+
COPY --from=build-env /build .
18
+
USER node
20
19
21
-
COPY --from=install /usr/src/app /usr/src/app/
22
-
23
-
USER bun
24
-
25
-
CMD [ "bun", "index.js" ]
26
-
27
-
EXPOSE 8080
20
+
EXPOSE 8080
21
+
CMD [ "node", "index.js"]
bun.lockb
bun.lockb
This is a binary file and will not be displayed.