From f57e0de3e79f304ff14faacdd8304c5c7fc2819e Mon Sep 17 00:00:00 2001 From: Eljakim Herrewijnen Date: Wed, 27 Dec 2023 23:43:29 +0100 Subject: [PATCH] updated docker --- react_usse/use_docker.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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