diff --git a/react_usse/use_docker.sh b/react_usse/use_docker.sh index 1e8dcc0a..9bcadb93 100755 --- a/react_usse/use_docker.sh +++ b/react_usse/use_docker.sh @@ -2,7 +2,7 @@ CONTAINER_NAME="usse_react" IMAGE_NAME="usse_react" -PORT_MAPPING="5000:3000" +PORT_MAPPING="15015:3000" COMMAND="bash" ok () { @@ -51,5 +51,18 @@ if [[ "$1" == "recreate" ]]; then docker stop ${CONTAINER_NAME} && docker rm ${CONTAINER_NAME} fi +if [[ "$1" == "shell" ]]; then + # Get a bash shell inside the container + docker exec -ti ${CONTAINER_NAME} ${COMMAND} + exit 0 +fi + +if [[ "$1" == "logs" ]]; then + # Get a bash shell inside the container + docker logs ${CONTAINER_NAME} + exit 0 +fi + + # Run container -docker run --name ${CONTAINER_NAME} -p ${PORT_MAPPING} ${IMAGE_NAME} \ No newline at end of file +docker run --name ${CONTAINER_NAME} -p ${PORT_MAPPING} -v /home/eljakim/Source/usse/source/scrape/out.json:/usr/src/app/src/locations.json ${IMAGE_NAME} \ No newline at end of file