Added docker files

parent 29732065
node_modules
\ No newline at end of file
# base image
FROM node:8.15.0
# set working directory
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
# add `/usr/src/app/node_modules/.bin` to $PATH
ENV PATH /usr/src/app/node_modules/.bin:$PATH
# install and cache app dependencies
COPY package.json /usr/src/app/package.json
RUN npm install --silent
RUN npm install react-scripts@1.1.1 -g --silent
# start app
CMD ["npm", "start"]
\ No newline at end of file
version: '3.5'
services:
sample-app:
container_name: sample-app
build:
context: .
dockerfile: Dockerfile
volumes:
- '.:/usr/src/app'
- '/usr/src/app/node_modules'
ports:
- '3000:3000'
environment:
- NODE_ENV=development
\ No newline at end of file
......@@ -23,23 +23,32 @@ class App extends Component {
this.state = {
sun : true ,
cloud : false ,
rain : false
rain : false,
}
}
Phase1() {
this.setState({sun: true});
this.setState({cloud : false});
this.setState({rain: false});
}
Phase2() {
this.setState({sun: true});
this.setState({cloud : true});
this.setState({rain: false});
}
Phase3() {
this.setState({sun: false});
this.setState({cloud : true});
this.setState({rain: true});
}
Phase4() {
this.setState({sun: false});
this.setState({cloud : true});
this.setState({rain: true});
}
render() {
return (
......@@ -110,13 +119,26 @@ Phase3() {
<Row>
<Col sm={12} xs={12}>
<Button onClick={() => this.Phase1()} className="B2"> PHASE 1 </Button>
{
<Button onClick={() => this.Phase1()} className="B2"> Evaporation </Button>
}
</Col>
<Col sm={12} xs={12}>
<Button onClick={() => this.Phase2()} className="B2"> PHASE 2 </Button>
{
<Button onClick={() => this.Phase2()} className="B2"> Condensation </Button>
}
</Col>
<Col sm={12} xs={12}>
<Button onClick={() => this.Phase3()} className="B2"> PHASE 3 </Button>
{
<Button onClick={() => this.Phase3()} className="B2"> Precipitation </Button>
}
</Col>
<Col sm={12} xs={12}>
{
<Button onClick={() => this.Phase4()} className="B2"> Collection </Button>
}
</Col>
</Row>
</Col>
......
......@@ -32,11 +32,11 @@
color: #FFFFFF;
text-align: left;
font-size: 28px;
padding: 20px;
padding: 100px;
width: 570px;
transition: all 0.5s;
cursor: pointer;
margin: 5px 2px;
margin: 5px 5px;
}
.B1 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment