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" value: "7070"
- name: LISTEN_ADDR - name: LISTEN_ADDR
value: "0.0.0.0" value: "0.0.0.0"
- name: GRPC_TRACE # - name: GRPC_TRACE
value: "all" # value: "all"
- name: GRPC_VERBOSITY # - name: GRPC_VERBOSITY
value: "debug" # value: "debug"
resources: resources:
requests: requests:
cpu: 200m cpu: 200m

View file

@ -13,15 +13,15 @@ spec:
- name: server - name: server
image: currencyservice image: currencyservice
ports: ports:
- containerPort: 31337 - containerPort: 7000
readinessProbe: readinessProbe:
periodSeconds: 5 periodSeconds: 5
tcpSocket: tcpSocket:
port: 31337 port: 7000
livenessProbe: livenessProbe:
periodSeconds: 5 periodSeconds: 5
tcpSocket: tcpSocket:
port: 31337 port: 7000
resources: resources:
requests: requests:
cpu: 100m cpu: 100m
@ -40,4 +40,4 @@ spec:
app: currencyservice app: currencyservice
ports: ports:
- port: 7000 - port: 7000
targetPort: 31337 targetPort: 7000

View file

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

View file

@ -20,7 +20,7 @@ const request = require('request');
const xml2js = require('xml2js'); const xml2js = require('xml2js');
const PROTO_PATH = path.join(__dirname, './proto/demo.proto'); 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 DATA_URL = 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml';
const shopProto = grpc.load(PROTO_PATH).hipstershop; const shopProto = grpc.load(PROTO_PATH).hipstershop;

View file

@ -22,7 +22,8 @@ RUN go install .
# --- # ---
FROM alpine as release 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 WORKDIR /frontend
COPY --from=builder /go/bin/frontend /frontend/server COPY --from=builder /go/bin/frontend /frontend/server
COPY ./templates ./templates COPY ./templates ./templates