diff --git a/src/cartservice/Program.cs b/src/cartservice/Program.cs index be374f4..ead7546 100644 --- a/src/cartservice/Program.cs +++ b/src/cartservice/Program.cs @@ -11,14 +11,14 @@ namespace cartservice { class Program { - const string CART_SERVICE_ADDRESS = "CART_SERVICE_ADDR"; + const string CART_SERVICE_ADDRESS = "LISTEN_ADDR"; const string REDIS_ADDRESS = "REDIS_ADDR"; - const string CART_SERVICE_PORT = "CART_SERVICE_PORT"; + const string CART_SERVICE_PORT = "PORT"; [Verb("start", HelpText = "Starts the server listening on provided port")] class ServerOptions { - [Option('h', "hostname", HelpText = "The ip on which the server is running. If not provided, CART_SERVICE_ADDR environment variable value will be used. If not defined, localhost is used")] + [Option('h', "hostname", HelpText = "The ip on which the server is running. If not provided, LISTEN_ADDR environment variable value will be used. If not defined, localhost is used")] public string Host { get; set; } [Option('p', "port", HelpText = "The port on for running the server")] diff --git a/src/cartservice/scripts/docker_setup.bat b/src/cartservice/scripts/docker_setup.bat index 2e4e371..b841758 100644 --- a/src/cartservice/scripts/docker_setup.bat +++ b/src/cartservice/scripts/docker_setup.bat @@ -9,8 +9,8 @@ GOTO End1 :local set REDIS_PORT=6379 set REDIS_ADDR=localhost:%REDIS_PORT% - set CART_SERVICE_ADDR=127.0.0.1 - set CART_SERVICE_PORT=7070 + set LISTEN_ADDR=127.0.0.1 + set PORT=7070 echo running redis emulator locally on a separate window taskkill /f /im "redis-server.exe" @@ -24,8 +24,8 @@ GOTO End1 :docker_local set REDIS_PORT=6379 set REDIS_ADDR=redis:%REDIS_PORT% - set CART_SERVICE_ADDR=127.0.0.1 - set CART_SERVICE_PORT=7070 + set LISTEN_ADDR=127.0.0.1 + set PORT=7070 echo run docker container with redis docker run -d --name=redis -p %REDIS_PORT%:%REDIS_PORT% redis @@ -34,7 +34,7 @@ GOTO End1 docker build -t cartservice ..\. echo run container image for cart service - docker run -it --rm -e REDIS_ADDR=%REDIS_ADDR% -e CART_SERVICE_ADDR=%CART_SERVICE_ADDR% -e CART_SERVICE_PORT=%CART_SERVICE_PORT% -p %CART_SERVICE_PORT%:%CART_SERVICE_PORT% cartservice + docker run -it --rm -e REDIS_ADDR=%REDIS_ADDR% -e LISTEN_ADDR=%LISTEN_ADDR% -e PORT=%PORT% -p %PORT%:%PORT% cartservice GOTO End1