forked from diego3g/umbriel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (22 loc) · 812 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
FROM node:lts-alpine AS devDependencies
WORKDIR /app
COPY package.json yarn.* tsconfig.json ./
COPY ./src ./src
RUN yarn install --production=false --frozen-lockfile
FROM node:lts-alpine AS dependencies
WORKDIR /app
COPY package.json yarn.* ./
COPY ./src ./src
RUN yarn install --production=true --frozen-lockfile
FROM node:lts-alpine AS build
WORKDIR /app
COPY --from=devDependencies /app/ .
COPY . .
RUN yarn build
FROM node:lts-alpine AS runtime
USER node
COPY --chown=node:node --from=dependencies /app/node_modules /home/node/app/node_modules/
COPY --from=build --chown=node:node /app/dist /home/node/app/dist/
COPY --from=build --chown=node:node /app/scripts /home/node/app/scripts/
COPY --from=build --chown=node:node /app/prisma /home/node/app/prisma/
ENTRYPOINT ["/home/node/app/scripts/server.sh"]