forked from ryanhugh/searchneu
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
31 lines (28 loc) · 835 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
# build environment
FROM node:12.16-alpine as build
WORKDIR /app
# Install deps
COPY package.json /app/package.json
COPY yarn.lock /app/yarn.lock
RUN yarn install --frozen-lockfile
# Copy source
COPY backend /app/backend
COPY common /app/common
COPY frontend /app/frontend
COPY prisma /app/prisma
RUN yarn build
# FROM node:12.16-alpine
# WORKDIR /root
# Get RDS Certificate
RUN apk update && apk add wget && rm -rf /var/cache/apk/* \
&& wget "https://s3.amazonaws.com/rds-downloads/rds-ca-2019-root.pem"
ENV dbCertPath /app/rds-ca-2019-root.pem
# COPY --from=build /app/package.json /app/yarn.lock ./
# COPY --from=build /app/dist ./dist
# COPY --from=build /app/public ./public
ENV NODE_ENV=prod
# RUN yarn install --production
COPY infrastructure/prod /app
ENTRYPOINT ["/app/entrypoint.sh"]
EXPOSE 5000
CMD ["yarn", "prod:start"]