-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from lowsideio/beta
next release - Dockerize
- Loading branch information
Showing
7 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Dockerfile | ||
|
||
FROM node:8-alpine | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package.json . | ||
|
||
RUN npm install | ||
|
||
# Bundle app source | ||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
EXPOSE 3000 | ||
|
||
CMD [ "npm", "run", "prod" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: '3' | ||
services: | ||
web: | ||
build: . | ||
ports: | ||
- "10001:3000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
"author": "Aksels Ledins <[email protected]>", | ||
"private": true, | ||
"scripts": { | ||
"prod": "node production-server.js", | ||
"in-docker": "docker-compose up", | ||
"dev": "node build/dev-server.js", | ||
"start": "npm run dev", | ||
"build": "node build/build.js", | ||
|
@@ -44,7 +46,7 @@ | |
"eslint-plugin-html": "^3.0.0", | ||
"eslint-plugin-import": "^2.7.0", | ||
"eventsource-polyfill": "^0.9.6", | ||
"express": "^4.14.1", | ||
"express": "^4.16.2", | ||
"extract-text-webpack-plugin": "^3.0.0", | ||
"file-loader": "^1.1.4", | ||
"friendly-errors-webpack-plugin": "^1.6.1", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
const express = require('express'); | ||
|
||
const app = express(); | ||
const router = express.Router(); | ||
|
||
app.use(express.static(`${__dirname}/dist`)); | ||
|
||
app.get('/*', (req, res) => { | ||
res.sendFile(`${__dirname}/dist/index.html`); | ||
}); | ||
|
||
app.use('/', router); | ||
|
||
app.listen(3000, () => { | ||
// eslint-disable-next-line | ||
console.log('lowside.io - web-frontend - running'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters