forked from PeggyJV/il-loss-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (36 loc) · 1.33 KB
/
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
# Dockerfile, not used for production
FROM node:14
WORKDIR /app
RUN apt-get update
RUN apt-get install -y vim
# Datadog Agent
# COPY ./etc /etc
# COPY ./etc/dd-agent-install.sh /
# COPY ./etc/dd-agent-init-v2.sh /
# RUN /bin/bash /dd-agent-install.sh
# Set nodejs app log paths
ENV APP_LOG="/var/log/app/out.log"
ENV APP_ERR_LOG="/var/log/app/err.log"
RUN yarn global add lerna
RUN yarn global add pm2
COPY package.json lerna.json yarn.lock /app/il-loss-charts/
COPY packages/sommelier-types/package.json /app/il-loss-charts/packages/sommelier-types/package.json
COPY packages/server/package.json /app/il-loss-charts/packages/server/package.json
COPY packages/workers/package.json /app/il-loss-charts/packages/workers/package.json
COPY packages/client/package.json /app/il-loss-charts/packages/client/package.json
WORKDIR /app/il-loss-charts
RUN yarn install --frozen-lockfile --non-interactive --silent --production=false
COPY . /app/il-loss-charts
ENV GENERATE_SOURCEMAP=false
# Run separately to take advantage of caching when only one package is changed
WORKDIR /app/il-loss-charts/packages/sommelier-types
RUN yarn build
WORKDIR /app/il-loss-charts/packages/server
RUN yarn build
WORKDIR /app/il-loss-charts/packages/workers
RUN yarn build
WORKDIR /app/il-loss-charts/packages/client
RUN yarn build
EXPOSE 3001
WORKDIR /app/il-loss-charts
CMD ["sh"]