Updating docker file to not include ports. Added scripts folder and script to run docker with env vars passed via command line. Also now the build and packaging is happening in container

This commit is contained in:
Simon Zeltser 2018-06-22 17:17:34 -07:00
parent 60efbc0f9e
commit 3262ff82b0
9 changed files with 123 additions and 7 deletions

View file

@ -0,0 +1,7 @@
@echo off
echo building container image for cart service
docker build -t cartservice ..\.
echo running the image, mapping the port
rem echo docker run -it --rm -p 5000:8080 --name

View file

@ -0,0 +1,13 @@
@echo off
set REDIS_PORT=6379
set REDIS_ADDR=172.30.147.193
set CART_SERVICE_ADDR=127.0.0.1
set CART_SERVICE_PORT=7070
rem run docker container with redis
rem docker run -d --name=redis -p %REDIS_PORT%:%REDIS_PORT% redis:alpine
rem run docker container with cart service
docker run -it --rm -e REDIS_ADDR=%REDIS_ADDR%:%REDIS_PORT% -e CART_SERVICE_ADDR=%CART_SERVICE_ADDR% -e CART_SERVICE_PORT=%CART_SERVICE_PORT% -p %CART_SERVICE_PORT%:%CART_SERVICE_PORT% cartservice
rem -e GRPC_TRACE=all -e GRPC_VERBOSITY=debug

View file

@ -0,0 +1,11 @@
@echo off
rem install redis on windows using choco
rem choco install redis-64
rem run redis
redis-server --daemonize yes
rem testing locally
rem redis-cli
rem SET foo bar
rem GET foo