fix paymentservice ports

This commit is contained in:
Abhilash Gnan 2019-05-04 14:32:32 +02:00
parent e0f2f5ec4a
commit a4da01c64e
2 changed files with 5 additions and 2 deletions

View file

@ -31,6 +31,9 @@ spec:
image: paymentservice
ports:
- containerPort: 50051
env:
- name: PORT
value: "50051"
readinessProbe:
exec:
command: ["/bin/grpc_health_probe", "-addr=:50051"]

View file

@ -27,7 +27,7 @@ const logger = pino({
});
class HipsterShopServer {
constructor (protoRoot, port = HipsterShopServer.DEFAULT_PORT) {
constructor (protoRoot, port = HipsterShopServer.PORT) {
this.port = port;
this.packages = {
@ -99,6 +99,6 @@ class HipsterShopServer {
}
}
HipsterShopServer.DEFAULT_PORT = 50051;
HipsterShopServer.PORT = process.env.PORT;
module.exports = HipsterShopServer;