-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
53 lines (36 loc) · 854 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
43
44
45
46
47
48
49
50
51
52
53
# FROM node:14.17.1 as base
# # Add package file
# COPY package*.json ./
# # Install deps
# RUN npm i
# # Copy source
# COPY src ./src
# COPY prisma ./prisma
# COPY tsconfig.json ./tsconfig.json
# COPY tslint.json ./tslint.json
# # Build dist
# RUN npm run build
# ENV PORT=3000
# EXPOSE 3000
# CMD ["dist/index.js"]
# # Start production image build
# # FROM gcr.io/distroless/nodejs:14
# # # Copy node modules and build directory
# # COPY --from=base ./node_modules ./node_modules
# # COPY --from=base /dist /dist
# # Expose port 3000
FROM node:14
WORKDIR /app
COPY package.json ./
RUN npm i
COPY src ./src
COPY prisma ./prisma
COPY tsconfig.json ./tsconfig.json
COPY tslint.json ./tslint.json
RUN npm run build
RUN ls -R --ignore=node_modules
#Expose the right port
ENV PORT=3000
EXPOSE 3000
# Run our app
CMD ["node", "dist/index.js"]