-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (31 loc) · 793 Bytes
/
Dockerfile
File metadata and controls
42 lines (31 loc) · 793 Bytes
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
FROM node:10.16.0 as builder
# Create app directory
WORKDIR /usr/src/app
COPY src/package.json .
COPY src/yarn.lock .
# Build devDependency for compliling assets for yarn build
RUN yarn install \
--prefer-offline \
--frozen-lockfile \
--non-interactive \
--production=false
COPY src .
RUN yarn build
# Remove packages you don't need for app in production
RUN rm -rf node_modules && \
NODE_ENV=production yarn install \
--prefer-offline \
--pure-lockfile \
--non-interactive \
--production=true
FROM node:10.16.0-alpine
# Create app directory
WORKDIR /usr/src/app
# Bundle app source
COPY --from=builder /usr/src/app .
ENV HOST 0.0.0.0
ENV AGGREGATOR_URL http://localhost:8000
EXPOSE 3000
# # start command
COPY ./entrypoint.sh ./
ENTRYPOINT [ "./entrypoint.sh" ]