Refactored the cart service to add more telemetry
1. Added more telemetry around starting redis cache 2. Now if you don't specify redis cache address via command line or environment variable, it will run with local cart (no redis). This is useful for debugging purposes
This commit is contained in:
parent
4e57b1e0aa
commit
4ac66b072a
5 changed files with 63 additions and 24 deletions
|
@ -9,7 +9,7 @@ GOTO End1
|
|||
:local
|
||||
set REDIS_PORT=6379
|
||||
set REDIS_ADDR=localhost:%REDIS_PORT%
|
||||
set LISTEN_ADDR=127.0.0.1
|
||||
set LISTEN_ADDR=0.0.0.0
|
||||
set PORT=7070
|
||||
|
||||
echo running redis emulator locally on a separate window
|
||||
|
@ -23,12 +23,12 @@ GOTO End1
|
|||
|
||||
:docker_local
|
||||
set REDIS_PORT=6379
|
||||
set REDIS_ADDR=redis:%REDIS_PORT%
|
||||
set LISTEN_ADDR=127.0.0.1
|
||||
set REDIS_ADDR=0.0.0.0:%REDIS_PORT%
|
||||
set LISTEN_ADDR=0.0.0.0
|
||||
set PORT=7070
|
||||
|
||||
echo run docker container with redis
|
||||
docker run -d --name=redis -p %REDIS_PORT%:%REDIS_PORT% redis
|
||||
start docker run -d --name=redis -p %REDIS_PORT%:%REDIS_PORT% redis
|
||||
|
||||
echo building container image for cart service
|
||||
docker build -t cartservice ..\.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue