From 43a65a7b67f259db83804f7d1ac3e80f174dbe6e Mon Sep 17 00:00:00 2001 From: Alpha Date: Thu, 19 Sep 2019 20:31:33 +0200 Subject: [PATCH] docker --- Dockerfile | 8 ++++++++ bin/www | 2 +- docker-compose.yml | 7 +++++++ package.json | 4 ++-- public/index.html | 13 ------------- public/stylesheets/style.css | 8 -------- 6 files changed, 18 insertions(+), 24 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml delete mode 100644 public/index.html delete mode 100644 public/stylesheets/style.css diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..182020d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:10.15-alpine + +WORKDIR /usr/src/app +COPY package*.json ./ + +RUN npm install + +COPY . . \ No newline at end of file diff --git a/bin/www b/bin/www index aeede98..f998913 100755 --- a/bin/www +++ b/bin/www @@ -12,7 +12,7 @@ var http = require('http'); * Get port from environment and store in Express. */ -var port = normalizePort(process.env.PORT || '3000'); +var port = normalizePort(process.env.PORT || '3001'); app.set('port', port); /** diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..624df80 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3' +services: + landingpage: + build: . + command: npm start + ports: + - "3001:3001" \ No newline at end of file diff --git a/package.json b/package.json index 474e149..b625b47 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,6 @@ "type": "git", "url": "https://git.cliffbreak.de/Alpha/DockerRestApi.git" }, - "author": "", + "author": "Moritz", "license": "ISC" -} +} \ No newline at end of file diff --git a/public/index.html b/public/index.html deleted file mode 100644 index ab1ad8a..0000000 --- a/public/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - Express - - - - -

Express

-

Welcome to Express

- - - diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css deleted file mode 100644 index 9453385..0000000 --- a/public/stylesheets/style.css +++ /dev/null @@ -1,8 +0,0 @@ -body { - padding: 50px; - font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; -} - -a { - color: #00B7FF; -}