From ab045ae6e7a418736b9771cef28ce065f971af4b Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Fri, 29 Jun 2018 13:45:03 -0700 Subject: [PATCH] currencyservice: change port to 7000 Signed-off-by: Ahmet Alp Balkan --- kubernetes-manifests/cartservice.yaml | 8 ++++---- kubernetes-manifests/currencyservice.yaml | 8 ++++---- src/currencyservice/Dockerfile | 4 ++-- src/currencyservice/server.js | 2 +- src/frontend/Dockerfile | 3 ++- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/kubernetes-manifests/cartservice.yaml b/kubernetes-manifests/cartservice.yaml index a0d24f6..4d40548 100644 --- a/kubernetes-manifests/cartservice.yaml +++ b/kubernetes-manifests/cartservice.yaml @@ -20,10 +20,10 @@ spec: value: "7070" - name: LISTEN_ADDR value: "0.0.0.0" - - name: GRPC_TRACE - value: "all" - - name: GRPC_VERBOSITY - value: "debug" + # - name: GRPC_TRACE + # value: "all" + # - name: GRPC_VERBOSITY + # value: "debug" resources: requests: cpu: 200m diff --git a/kubernetes-manifests/currencyservice.yaml b/kubernetes-manifests/currencyservice.yaml index 4a4dc64..e7de91c 100644 --- a/kubernetes-manifests/currencyservice.yaml +++ b/kubernetes-manifests/currencyservice.yaml @@ -13,15 +13,15 @@ spec: - name: server image: currencyservice ports: - - containerPort: 31337 + - containerPort: 7000 readinessProbe: periodSeconds: 5 tcpSocket: - port: 31337 + port: 7000 livenessProbe: periodSeconds: 5 tcpSocket: - port: 31337 + port: 7000 resources: requests: cpu: 100m @@ -40,4 +40,4 @@ spec: app: currencyservice ports: - port: 7000 - targetPort: 31337 + targetPort: 7000 diff --git a/src/currencyservice/Dockerfile b/src/currencyservice/Dockerfile index 7eb074b..a87d34f 100644 --- a/src/currencyservice/Dockerfile +++ b/src/currencyservice/Dockerfile @@ -3,5 +3,5 @@ WORKDIR /usr/src/app COPY package*.json ./ RUN npm install --only=production COPY . . -EXPOSE 31337 -CMD [ "node", "server.js" ] \ No newline at end of file +EXPOSE 7000 +CMD [ "node", "server.js" ] diff --git a/src/currencyservice/server.js b/src/currencyservice/server.js index bd8f7f0..3274788 100644 --- a/src/currencyservice/server.js +++ b/src/currencyservice/server.js @@ -20,7 +20,7 @@ const request = require('request'); const xml2js = require('xml2js'); const PROTO_PATH = path.join(__dirname, './proto/demo.proto'); -const PORT = 31337; +const PORT = 7000; const DATA_URL = 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml'; const shopProto = grpc.load(PROTO_PATH).hipstershop; diff --git a/src/frontend/Dockerfile b/src/frontend/Dockerfile index d3271fe..40f36ac 100644 --- a/src/frontend/Dockerfile +++ b/src/frontend/Dockerfile @@ -22,7 +22,8 @@ RUN go install . # --- FROM alpine as release -RUN apk add --no-cache ca-certificates +RUN apk add --no-cache ca-certificates \ + busybox-extras net-tools bind-tools WORKDIR /frontend COPY --from=builder /go/bin/frontend /frontend/server COPY ./templates ./templates