From c8b5bca6c72dfeea631202250bcffa3cc7069d22 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 24 Jul 2019 21:14:15 +0200 Subject: wip --- apps/mi-gateway/Dockerfile | 6 ++---- apps/mi-gateway/server.js | 7 ++++++- apps/mi-processor/Dockerfile | 6 ++---- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'apps') diff --git a/apps/mi-gateway/Dockerfile b/apps/mi-gateway/Dockerfile index dbb042d..4d5609d 100644 --- a/apps/mi-gateway/Dockerfile +++ b/apps/mi-gateway/Dockerfile @@ -2,13 +2,11 @@ FROM node:8 WORKDIR /opt -COPY package*.json ./ - RUN apt update && apt -y full-upgrade RUN apt install -y postgresql-client + +COPY package*.json ./ RUN npm install -# If you are building your code for production -# RUN npm ci --only=production COPY . . diff --git a/apps/mi-gateway/server.js b/apps/mi-gateway/server.js index 4d2546f..a0f3a04 100644 --- a/apps/mi-gateway/server.js +++ b/apps/mi-gateway/server.js @@ -7,7 +7,12 @@ const HOST = '0.0.0.0'; const app = express(); app.get('/', (req, res) => { - res.send('mi-gateway 2\n'); + res.set('Content-Type', 'text/plain'); + res.send('mi-gateway\n' + + '$HOSTNAME = ' + process.env["HOSTNAME"] + '\n' + + '$PGDATABASE = ' + process.env["PGDATABASE"] + '\n' + + '$PGHOST = ' + process.env["PGHOST"] + '\n' + + '$PGUSER = ' + process.env["PGUSER"] + '\n'); }); app.listen(PORT, HOST); diff --git a/apps/mi-processor/Dockerfile b/apps/mi-processor/Dockerfile index dbb042d..4d5609d 100644 --- a/apps/mi-processor/Dockerfile +++ b/apps/mi-processor/Dockerfile @@ -2,13 +2,11 @@ FROM node:8 WORKDIR /opt -COPY package*.json ./ - RUN apt update && apt -y full-upgrade RUN apt install -y postgresql-client + +COPY package*.json ./ RUN npm install -# If you are building your code for production -# RUN npm ci --only=production COPY . . -- cgit v1.2.3