diff --git a/backend/run_backend.sh b/backend/run_backend.sh index d954bfe..b528403 100644 --- a/backend/run_backend.sh +++ b/backend/run_backend.sh @@ -1,3 +1,16 @@ -#! /bin/bash -docker build -t go-app . -docker run -p 8080:8080 go-app \ No newline at end of file +#!/bin/bash + +# Name of your Docker application +APP_NAME="go-app" + +# Stop the currently running container +docker stop $APP_NAME + +# Remove the stopped container +docker rm $APP_NAME + +# Build the new Docker image +docker build -t $APP_NAME . + +# Run the new Docker container +docker run -d --name $APP_NAME -p 8080:8080 $APP_NAME