forked from NangoHQ/nango
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (25 loc) · 809 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
# This is the Dockerfile for building a production image with Pizzly
# Build image
FROM node:13.5.0-alpine3.11
WORKDIR /app
# Copy in dependencies for building
COPY *.json ./
COPY yarn.lock ./
COPY config ./config
COPY integrations ./integrations/
COPY src ./src/
COPY tests ./tests/
COPY views ./views/
RUN yarn install
# Actual image to run from.
FROM node:13.5.0-alpine3.11
# Make sure we have ca certs for TLS
RUN apk --no-cache add ca-certificates
# Make a directory for the node user. Not running Pizzly as root.
RUN mkdir /home/node/app && chown -R node:node /home/node/app
WORKDIR /home/node/app
USER node
COPY --chown=node:node --from=0 /app/dist/ .
COPY --chown=node:node --from=0 /app/views ./views
COPY --chown=node:node --from=0 /app/node_modules ./node_modules
CMD ["node", "src"]