Skip to content

Commit

Permalink
Merge e388f6c into f4eefcb
Browse files Browse the repository at this point in the history
  • Loading branch information
BolajiOlajide committed Aug 27, 2018
2 parents f4eefcb + e388f6c commit ad21ae0
Show file tree
Hide file tree
Showing 10 changed files with 8,197 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
LICENSE
.vscode/
.idea/
yarn.lock
package-lock.json
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:carbon

LABEL maintainer="KINGDOM ISAAC"
LABEL version="1.0"

ENV HOME=/app
WORKDIR $HOME

COPY package.json .
RUN npm install
COPY . .

EXPOSE 8080

CMD [ "./start.sh" ]
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ npm run report-coverage
* 0.0.1
* Work in progress

### Docker

Build the image with the command
```sh
docker build . -t react-webpack-start
```
This builds the image with the tag `react-webpack-start`. Once this is completed, you can instantiate the container with the image with the command
```sh
docker run -p 8080:8080 -v rws:/app react-webpack-start:latest
```

## Meta

Orjiewuru Kingdom – [@kingisaac95](https://twitter.com/kingisaac95)kingdom.orjiewuru@gmail.com
Expand Down
6 changes: 3 additions & 3 deletions src/app/App.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import React, { Fragment } from 'react';
import Header from './components/Header';
import Content from './views/Content';

const App = () => (
<div>
<Fragment>
<Header />
<Content />
</div>
</Fragment>
);

export default App;
2 changes: 1 addition & 1 deletion src/app/views/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Content = () => (
<a
href="https://www.w3schools.com/w3css/tryw3css_templates_coming_soon.htm"
target="_blank"
>W3C template</a>
>W3C template </a>
</p>
<p>
<span>Built with ❤️ by </span>
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<body>
<section id="root"></section>
</body>
</html>
</html>
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import ReactDOM from 'react-dom';
import App from './app/App';
import './index.scss';

export const Root = () => <App />
export const Root = () => <App />;

ReactDOM.render(<Root />, document.getElementById('root'));
8 changes: 4 additions & 4 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ body {

hr {
border: 0;
border-top: 1px solid $white;
box-sizing: content-box;
height: 0;
overflow: visible;
border-top: 1px solid $white;
box-sizing: content-box;
height: 0;
overflow: visible;
}

.bgimg {
Expand Down
5 changes: 5 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

./node_modules/.bin/webpack-dev-server --mode development --host 0.0.0.0 # replacing this instead of npm start because of some flags

# if you intend to use docker for production, you can add a ternary here to toggle scripts
Loading

0 comments on commit ad21ae0

Please sign in to comment.