-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.api
More file actions
40 lines (29 loc) · 824 Bytes
/
Dockerfile.api
File metadata and controls
40 lines (29 loc) · 824 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
34
35
36
37
38
39
40
# The Licensed Work is (c) 2023 Sygma
# SPDX-License-Identifier: LGPL-3.0-only
FROM node:18.15-alpine AS builder
# update packages
RUN apk update
# install git
RUN apk add --no-cache git
# create root application folder
WORKDIR /app
# copy configs to /app folder
COPY .yarnrc.yml ./
COPY package*.json ./
COPY tsconfig.json ./
COPY yarn.lock ./
COPY prisma ./prisma/
RUN yarn install --frozen-lockfile
# copy source code to /app/src folder
COPY . .
# check files list
RUN ls -a
RUN yarn prisma:generate
RUN yarn build
FROM node:18.15-alpine
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/build ./build
LABEL org.opencontainers.image.source https://github.com/sprintertech/sygma-explorer-indexer
EXPOSE 8000
CMD [ "node", "./build/index.js"]