Add multistage docker image (11MB) (#164)
This commit is contained in:
parent
ea523021ce
commit
ede7b13c77
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM node:10 as builder
|
||||||
|
MAINTAINER "chevdor@gmail.com"
|
||||||
|
WORKDIR /polkadot
|
||||||
|
COPY . .
|
||||||
|
RUN yarn && \
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
# RUN apk --no-cache add ca-certificates
|
||||||
|
# WORKDIR /app
|
||||||
|
COPY --from=builder /polkadot/packages/apps/build /usr/share/nginx/html
|
||||||
|
# CMD ["./app"]
|
||||||
10
README.md
10
README.md
@ -64,3 +64,13 @@ Demos for the different libraries can be viewed with `yarn run demo:<name>` and
|
|||||||
## tutorials
|
## tutorials
|
||||||
|
|
||||||
Looking for tutorials to get started? Look at [examples](examples/README.md) for a step-by-step guide to using the API and Components to display some information.
|
Looking for tutorials to get started? Look at [examples](examples/README.md) for a step-by-step guide to using the API and Components to display some information.
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
### Run
|
||||||
|
|
||||||
|
docker run --rm -it --name polkadot-ui -p 80:80 chevdor/polkadot-ui:latest
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
docker build -t chevdor/polkadot-ui:latest .
|
||||||
|
|||||||
@ -36,9 +36,14 @@ function App ({ className, style }: Props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
createApp(App, {
|
// tslint:disable-next-line
|
||||||
// tslint:disable-next-line
|
var url = (process.env.WS_URL === null) || (process.env.WS_URL === '')
|
||||||
url: (process.env.WS_URL === null) || (process.env.WS_URL === '')
|
|
||||||
? undefined
|
? undefined
|
||||||
: process.env.WS_URL
|
: process.env.WS_URL;
|
||||||
|
|
||||||
|
console.log('process.env.WS_URL=', process.env.WS_URL);
|
||||||
|
console.log('Web socket url=', url);
|
||||||
|
|
||||||
|
createApp(App, {
|
||||||
|
url
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user