aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-05-22 15:56:29 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-05-22 15:56:29 +0200
commitba76764c198e9232b3152568008d5aa5199a1fd0 (patch)
treef3427a1c198274dbf589362c166e542eb746e0fc
parentcc2decc957e7cbb2936fa4a8730bf5baa6c21c61 (diff)
downloadk8s-sandbox-ba76764c198e9232b3152568008d5aa5199a1fd0.tar.gz
k8s-sandbox-ba76764c198e9232b3152568008d5aa5199a1fd0.tar.bz2
k8s-sandbox-ba76764c198e9232b3152568008d5aa5199a1fd0.tar.xz
k8s-sandbox-ba76764c198e9232b3152568008d5aa5199a1fd0.zip
wip
-rw-r--r--k8s/mi.yaml2
-rw-r--r--mi-gateway/Dockerfile4
-rw-r--r--mi-processor/Dockerfile2
-rw-r--r--mi-processor/server.js19
4 files changed, 22 insertions, 5 deletions
diff --git a/k8s/mi.yaml b/k8s/mi.yaml
index 43d6adf..75b9254 100644
--- a/k8s/mi.yaml
+++ b/k8s/mi.yaml
@@ -54,7 +54,7 @@ kind: Deployment
metadata:
name: mi-gateway-deployment
spec:
- replicas: 1
+ replicas: 3
selector:
matchLabels:
app: mi-gateway-pod
diff --git a/mi-gateway/Dockerfile b/mi-gateway/Dockerfile
index ae3062b..dbb042d 100644
--- a/mi-gateway/Dockerfile
+++ b/mi-gateway/Dockerfile
@@ -4,8 +4,8 @@ WORKDIR /opt
COPY package*.json ./
-RUN apt update && apt full-upgrade
-RUN apt install postgresql-client
+RUN apt update && apt -y full-upgrade
+RUN apt install -y postgresql-client
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
diff --git a/mi-processor/Dockerfile b/mi-processor/Dockerfile
index d657cc3..dbb042d 100644
--- a/mi-processor/Dockerfile
+++ b/mi-processor/Dockerfile
@@ -4,6 +4,8 @@ WORKDIR /opt
COPY package*.json ./
+RUN apt update && apt -y full-upgrade
+RUN apt install -y postgresql-client
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
diff --git a/mi-processor/server.js b/mi-processor/server.js
index b739070..8b7c9d8 100644
--- a/mi-processor/server.js
+++ b/mi-processor/server.js
@@ -7,10 +7,25 @@ const HOST = '0.0.0.0';
const app = express();
app.get('/', (req, res) => {
- res.send('mi-server\n');
+ res.send('mi-processor\n');
});
app.listen(PORT, HOST);
console.log(`Running on http://${HOST}:${PORT}`);
-console.log('Environment', process.env)
+var keys = [];
+for(var key in process.env) {
+ if (key.startsWith("npm")) {
+ continue;
+ }
+
+ keys[keys.length] = key;
+}
+keys.sort()
+
+console.log("ENV");
+for (var idx in keys) {
+ const key = keys[idx];
+ const value = process.env[key];
+ console.log(" " + key + "=" + value);
+}