add Dockerfile and index

This commit is contained in:
chengwenxi 2018-06-11 18:09:23 +08:00
parent fc9717157f
commit f6ff078265
2 changed files with 85 additions and 0 deletions

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:latest
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
COPY yarn.lock /usr/src/app/
RUN yarn
# Bundle app source
COPY . /usr/src/app
RUN yarn build
EXPOSE 8080
CMD [ "yarn", "start" ]

67
index.html Normal file
View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Cosmos Monitor</title>
<meta name=viewport content="width=device-width, user-scalable=no">
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<div id="app">
<div id="load">
<div id="load-container">
<div id="load-title">Cosmos Monitor</div>
<div id="load-main">
<p class="green">app is loading&hellip;</p>
<p>taking forever? disable noscript</p>
<p>need help? <a href="mailto:hello@tendermint.com">email us</a></p>
</div>
</div>
</div>
</div>
<script>
if (!Object.defineProperty) {
window.alert('Cosmos Monitor does not support Internet Explorer 8 and below. Please update your browser to a modern version of Chrome, Firefox, or Safari.')
}
</script>
<style>
body { margin: 0; }
#load {
display: flex;
align-items: center;
justify-content: center;
width: 100vw;
height: 100vh;
background: #000;
}
#load-container {
font: 16px/1.5 system, -apple-system, BlinkMacSystemFont, "Roboto", "Seogue UI", "Helvetica Neue", "Lucida Grande", sans-serif;
color: #fff;
margin: 0 auto;
text-align: center;
width: 18rem;
height: 18rem;
display: flex;
flex-flow: column nowrap;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
#load-title {
font-size: 1.5rem;
line-height: 3;
font-weight: 500;
width: 100%;
}
#load-main p {
font-size: 1rem;
font-weight: 300;
color: #ccc;
margin-bottom: 1em;
}
#load-main p.green {
color: hsl(210,50%,50%);
}
#load-main a {
text-decoration: none;
color: hsl(210,50%,50%);
}
</style>