feat: improve bridge_ui tilt

properly cache npm ci in Docker container image
support hotloading outside ci
This commit is contained in:
Evan Gray 2022-02-12 04:01:11 +00:00 committed by Evan Gray
parent f0bbacdca9
commit b524782400
3 changed files with 926 additions and 29 deletions

View File

@ -6,25 +6,7 @@ FROM node:16-alpine@sha256:f21f35732964a96306a84a8c4b5a829f6d3a0c5163237ff4b6b8b
RUN mkdir -p /app
WORKDIR /app
ADD . .
# these are only needed if you are using the local version of the sdk (npm i ../sdk/js)
# RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
# npm ci --prefix ethereum
# RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
# npm ci --prefix sdk/js
# RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
# npm run build --prefix sdk/js
WORKDIR ./bridge_ui
COPY bridge_ui/package.json bridge_ui/package-lock.json ./
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm ci
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm i serve
RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm run build
npm ci
COPY bridge_ui .

930
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -79,6 +79,7 @@
"jest": "^26.6.0",
"jest-watch-typeahead": "^0.6.4",
"prettier": "^2.3.2",
"serve": "^13.0.2",
"truffle": "^5.4.1",
"wasm-loader": "^1.3.0"
}