-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 892 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM node:20-bookworm-slim@sha256:17281e8d1dc4d671976c6b89a12f47a44c2f390b63a989e2e327631041f544fd AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY tsconfig.json ./
COPY proto ./proto
COPY fixtures ./fixtures
COPY src ./src
COPY entrypoint.sh ./entrypoint.sh
RUN npm run build && chmod +x /app/entrypoint.sh
FROM node:20-bookworm-slim@sha256:17281e8d1dc4d671976c6b89a12f47a44c2f390b63a989e2e327631041f544fd
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
COPY --from=build /app/proto ./proto
COPY --from=build /app/fixtures ./fixtures
COPY --from=build /app/entrypoint.sh ./entrypoint.sh
ENV NODE_ENV=production
ENV PORT=8080
ENV GRPC_PORT=9090
ENTRYPOINT ["./entrypoint.sh"]
CMD ["node", "dist/bin/app.js"]