Merge branch 'master' of sso://user/ahmetb/microservices-demo

This commit is contained in:
Sandeep Dinesh 2018-06-29 17:16:37 -04:00
commit dbe99160bc
5 changed files with 13 additions and 12 deletions

View file

@ -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

View file

@ -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

View file

@ -3,5 +3,5 @@ WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install --only=production
COPY . .
EXPOSE 31337
CMD [ "node", "server.js" ]
EXPOSE 7000
CMD [ "node", "server.js" ]

View file

@ -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;

View file

@ -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