-
Notifications
You must be signed in to change notification settings - Fork 67
/
Dockerfile.production
71 lines (60 loc) · 1.98 KB
/
Dockerfile.production
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM node:18.19.1
EXPOSE 3000
COPY package.json /usr/src/app/package.json
COPY yarn.lock /usr/src/app/yarn.lock
COPY ./server/ /usr/src/app/server
COPY ./scripts/get-config-types.js /usr/src/app/scripts/get-config-types.js
COPY ./blockchain/abi/*.json /usr/src/app/blockchain/abi/
WORKDIR /usr/src/app
ARG CONFIG_URL=''
ENV CONFIG_URL=$CONFIG_URL
ARG NPM_TOKEN=''
ENV NPM_TOKEN=$NPM_TOKEN
RUN echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
RUN yarn --no-progress --non-interactive --frozen-lockfile
ARG COMMIT_SHA='' \
AJNA_SUBGRAPH_URL='' \
AJNA_SUBGRAPH_URL_GOERLI='' \
AJNA_SUBGRAPH_V2_URL='' \
AJNA_SUBGRAPH_V2_URL_GOERLI='' \
MIXPANEL_ENV='' \
MIXPANEL_KEY='' \
SHOW_BUILD_INFO='' \
ETHERSCAN_API_KEY='' \
BLOCKNATIVE_API_KEY='' \
INFURA_PROJECT_ID='' \
NODE_ENV='' \
NEXT_PUBLIC_SENTRY_ENV='' \
SENTRY_AUTH_TOKEN='' \
PRODUCT_HUB_KEY='' \
ONE_INCH_API_KEY='' \
NEXT_PUBLIC_SPINDL_SDK_KEY='' \
ONE_INCH_API_URL='' \
REFERRAL_SUBGRAPH_URL=''
ENV COMMIT_SHA=$COMMIT_SHA \
AJNA_SUBGRAPH_URL=$AJNA_SUBGRAPH_URL \
AJNA_SUBGRAPH_URL_GOERLI=$AJNA_SUBGRAPH_URL_GOERLI \
AJNA_SUBGRAPH_V2_URL=$AJNA_SUBGRAPH_V2_URL \
AJNA_SUBGRAPH_V2_URL_GOERLI=$AJNA_SUBGRAPH_V2_URL_GOERLI \
MIXPANEL_ENV=$MIXPANEL_ENV \
MIXPANEL_KEY=$MIXPANEL_KEY \
ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY \
BLOCKNATIVE_API_KEY=$BLOCKNATIVE_API_KEY \
INFURA_PROJECT_ID=$INFURA_PROJECT_ID \
USE_TERMS_OF_SERVICE=1 \
USE_TRM_API=1 \
SHOW_BUILD_INFO=$SHOW_BUILD_INFO \
NODE_ENV=$NODE_ENV \
SENTRY_RELEASE=$COMMIT_SHA \
NEXT_PUBLIC_SENTRY_ENV=$NEXT_PUBLIC_SENTRY_ENV \
SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN \
PRODUCT_HUB_KEY=$PRODUCT_HUB_KEY \
ONE_INCH_API_KEY=$ONE_INCH_API_KEY \
NEXT_PUBLIC_SPINDL_SDK_KEY=$NEXT_PUBLIC_SPINDL_SDK_KEY \
ONE_INCH_API_URL=$ONE_INCH_API_URL \
REFERRAL_SUBGRAPH_URL=$REFERRAL_SUBGRAPH_URL \
NODE_OPTIONS=--max-old-space-size=6144
COPY . .
RUN chmod +x ./scripts/wait-for-it.sh \
&& npm run build
CMD [ "npm", "run", "start:prod" ]