2020-09-02 17:43:48 +03:00
|
|
|
FROM node:10 as contracts
|
2020-07-14 17:53:05 +03:00
|
|
|
|
|
|
|
WORKDIR /mono
|
|
|
|
|
|
|
|
COPY contracts/package.json contracts/package-lock.json ./contracts/
|
|
|
|
|
|
|
|
WORKDIR /mono/contracts
|
|
|
|
RUN npm install --only=prod
|
|
|
|
|
|
|
|
COPY ./contracts/truffle-config.js ./
|
|
|
|
COPY ./contracts/contracts ./contracts
|
|
|
|
RUN npm run compile
|
|
|
|
|
2020-09-02 17:43:48 +03:00
|
|
|
FROM node:10
|
2019-06-14 16:50:22 +03:00
|
|
|
|
|
|
|
WORKDIR /mono
|
|
|
|
COPY package.json .
|
2020-07-14 17:53:05 +03:00
|
|
|
COPY --from=contracts /mono/contracts/build ./contracts/build
|
2019-07-15 19:07:11 +03:00
|
|
|
COPY commons/package.json ./commons/
|
2019-06-14 16:50:22 +03:00
|
|
|
COPY ui/package.json ./ui/
|
|
|
|
COPY ui/lib/web3-eth/index.js ./ui/lib/web3-eth/index.js
|
|
|
|
COPY yarn.lock .
|
2020-07-14 17:53:05 +03:00
|
|
|
RUN NOYARNPOSTINSTALL=1 yarn install --frozen-lockfile --production
|
2019-06-14 16:50:22 +03:00
|
|
|
|
2019-07-15 19:07:11 +03:00
|
|
|
COPY ./commons ./commons
|
2019-06-14 16:50:22 +03:00
|
|
|
COPY ./ui ./ui
|
2020-07-14 17:53:05 +03:00
|
|
|
|
2019-09-13 10:11:38 +03:00
|
|
|
ARG DOT_ENV_PATH=./ui/.env
|
|
|
|
COPY ${DOT_ENV_PATH} ./ui/.env
|
|
|
|
|
2019-06-14 16:50:22 +03:00
|
|
|
WORKDIR /mono/ui
|
|
|
|
CMD echo "To start a UI application run:" \
|
|
|
|
"yarn start"
|