Skip to content

Commit

Permalink
Initialized Repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Brack committed Jul 6, 2019
0 parents commit 4906723
Show file tree
Hide file tree
Showing 15 changed files with 7,186 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
Empty file added README.md
Empty file.
2 changes: 2 additions & 0 deletions client/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.next
2 changes: 2 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.next
node_modules
15 changes: 15 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:10

WORKDIR /usr/app/next

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build

EXPOSE 3000

CMD ["npm", "start"]
Empty file added client/index.js
Empty file.
5,420 changes: 5,420 additions & 0 deletions client/package-lock.json

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "client",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "next",
"build": "next build",
"start": "next start"
},
"author": "",
"license": "ISC",
"dependencies": {
"next": "^8.1.0",
"react": "^16.8.6",
"react-dom": "^16.8.6"
}
}
11 changes: 11 additions & 0 deletions client/pages/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const Home = () => {
return (
<div>
<h1>
Welcome to NextJS!
</h1>
</div>
)
}

export default Home;
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3'
services:
jenkins:
container_name: jenkins
image: jenkins/jenkins:lts
volumes:
- jenkins_home:/var/jenkins_home
ports:
- 8080:8080
express:
container_name: express
build: ./express
ports:
- "1337:1337"
client:
container_name: client
build: ./client
ports:
- "80:3000"
volumes:
jenkins_home: {}
1 change: 1 addition & 0 deletions express/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
13 changes: 13 additions & 0 deletions express/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:10

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install

COPY . .

EXPOSE 1337

CMD ["npm", "start"]
12 changes: 12 additions & 0 deletions express/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const express = require('express');
const PORT = 1337;
const app = express();

app.use(express.json());

app.get("/", (req, res) => {
console.log("ROOT ENDPOINT HIT");
return res.status(200).json("Hello World!");
});

app.listen(PORT, () => console.log(`APP RUNNING ON PORT ${PORT}`));
Loading

0 comments on commit 4906723

Please sign in to comment.