-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
42 lines (30 loc) · 880 Bytes
/
Dockerfile
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
41
42
# 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 ./
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
COPY --from=builder /app/prisma ./prisma
LABEL org.opencontainers.image.source https://github.com/sprintertech/sygma-explorer-indexer
EXPOSE 8000
COPY start-prod.sh /start-prod.sh
ENTRYPOINT ["sh","/start-prod.sh"]