Skip to content

Commit

Permalink
Merge pull request #1549 from smartcontractkit/chores/explorer-client…
Browse files Browse the repository at this point in the history
…-in-yarn-workspace

Add explorer to yarn workspaces
  • Loading branch information
rupurt authored Aug 21, 2019
2 parents a9e6bf5 + 4ede71c commit 56d8ca9
Show file tree
Hide file tree
Showing 15 changed files with 3,606 additions and 18,790 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ jobs:
- checkout
- run:
name: Docker build
command: cd explorer && docker build .
command: docker build -f explorer/Dockerfile .
reportcoverage:
docker:
- image: smartcontract/builder:1.0.22
Expand Down
10 changes: 5 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ node_modules/
vendor/
tmp/

evm/
evm/node_modules
examples/
integration/
integration/node_modules

internal/gethnet/datadir/geth
internal/clroot/db.bolt
internal/clroot/*.jsonl
tools/gethnet/datadir/geth
tools/clroot/db.bolt
tools/clroot/*.jsonl

sgx/target/

Expand Down
2 changes: 1 addition & 1 deletion explorer/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_modules
client/node_modules
client/build
client/.yarn.lock.md5
*.md5
*.md5
8 changes: 0 additions & 8 deletions explorer/.npmrc

This file was deleted.

30 changes: 23 additions & 7 deletions explorer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
FROM node:10.15-alpine as builder
FROM node:10.15 as builder

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH

COPY package.json yarn.lock ./
COPY client/package.json client/yarn.lock client/
RUN yarn autoinstall

ADD . .
RUN yarn build

RUN yarn install
RUN cd explorer \
&& yarn install \
&& yarn build

FROM node:10.15-alpine

WORKDIR /app

COPY --from=builder /usr/src/app/package.json package.json
COPY --from=builder /usr/src/app/yarn.lock yarn.lock
COPY --from=builder /usr/src/app/node_modules node_modules
COPY --from=builder /usr/src/app/explorer/node_modules explorer/node_modules
COPY --from=builder /usr/src/app/explorer/package.json explorer/package.json
COPY --from=builder /usr/src/app/explorer/src explorer/src
COPY --from=builder /usr/src/app/explorer/tsconfig.json explorer/tsconfig.json
COPY --from=builder /usr/src/app/explorer/ormconfig.json explorer/ormconfig.json
COPY --from=builder /usr/src/app/explorer/client/public explorer/client/public
COPY --from=builder /usr/src/app/explorer/client/build explorer/client/build
COPY --from=builder /usr/src/app/styleguide styleguide

ENV NODE_ENV production
ENTRYPOINT [ "yarn", "prod" ]
ENTRYPOINT [ "yarn", "workspace", "@chainlink/explorer", "run", "prod" ]
11 changes: 4 additions & 7 deletions explorer/client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "explorer-client",
"name": "@chainlink/explorer-client",
"private": true,
"version": "0.0.0",
"description": "LINK Explorer Client",
Expand All @@ -22,12 +22,12 @@
"scripts": {
"start": "cross-env PORT=3001 craco start",
"build:clean": "rm -rf build",
"prebuild": "yarn install",
"build": "craco build",
"lint": "eslint . --color",
"test": "react-scripts test",
"test-ci": "CI=true react-scripts test",
"test-ci:silent": "yarn test-ci --silent",
"autoinstall": "md5sum -c .yarn.lock.md5 || yarn install && md5sum yarn.lock > .yarn.lock.md5"
"test-ci:silent": "yarn test-ci --silent"
},
"main": "app.js",
"proxy": "http://localhost:8080",
Expand All @@ -40,7 +40,7 @@
"@types/classnames": "^2.2.7",
"@types/enzyme": "^3.9.1",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/jest": "^24.0.11",
"@types/jest": "^24.0.0",
"@types/material-ui": "^0.21.6",
"@types/reach__router": "^1.2.3",
"@types/react": "^16.8.8",
Expand Down Expand Up @@ -94,9 +94,6 @@
"prettier-config-standard": ">= 1.0.0",
"typescript": "^3.5.0"
},
"resolutions": {
"caniuse-lite": "1.0.30000957"
},
"comments": {
"resolutions": "Had to lock caniuse-lite version at last working version with browserlists"
}
Expand Down
Loading

0 comments on commit 56d8ca9

Please sign in to comment.