forked from hacpy/oasis-borrow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (35 loc) · 1.01 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
FROM node:12.20.0
EXPOSE 3000
COPY package.json /usr/src/app/package.json
COPY yarn.lock /usr/src/app/yarn.lock
COPY ./server/ /usr/src/app/server
WORKDIR /usr/src/app
RUN apt update && apt-get install -y libudev-dev && apt-get install libusb-1.0-0
RUN yarn --no-progress --non-interactive --frozen-lockfile
ARG COMMIT_SHA
ARG API_HOST
ARG MIXPANEL_ENV
ARG MIXPANEL_KEY
ARG ADROLL_ADV_ID
ARG ADROLL_PIX_ID
ARG SHOW_BUILD_INFO
ARG ETHERSCAN_API_KEY
ARG BLOCKNATIVE_API_KEY
ARG INFURA_PROJECT_ID
ARG NODE_ENV
ENV COMMIT_SHA=$COMMIT_SHA \
API_HOST=$API_HOST \
MIXPANEL_ENV=$MIXPANEL_ENV \
MIXPANEL_KEY=$MIXPANEL_KEY \
ADROLL_ADV_ID=$ADROLL_ADV_ID \
ADROLL_PIX_ID=$ADROLL_PIX_ID \
ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY \
BLOCKNATIVE_API_KEY=$BLOCKNATIVE_API_KEY \
INFURA_PROJECT_ID=$INFURA_PROJECT_ID \
USE_TERMS_OF_SERVICE=1 \
SHOW_BUILD_INFO=$SHOW_BUILD_INFO \
NODE_ENV=$NODE_ENV
COPY . .
RUN chmod +x ./scripts/wait-for-it.sh \
&& npm run build
CMD [ "npm", "run", "start:prod" ]