diff --git a/start_container.sh b/start_container.sh index 6b653a4..f70dd92 100755 --- a/start_container.sh +++ b/start_container.sh @@ -5,9 +5,11 @@ # `-o pipefail`: Prevent errors in a pipeline (`|`) from being masked set -uo pipefail +declare -r APP_PORT=8123 + # Import environment variables from .env set -o allexport && source .env && set +o allexport - -echo "Starting container for image '$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG', exposing port 8123/tcp" -docker run -p 8123:8123 "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_TAG" - +echo "Starting container for image '$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG', exposing port ${APP_PORT}/tcp" +echo "- Run 'curl http://localhost:${APP_PORT}/status' to send a test request to the containerized app." +echo "- Enter Ctrl-C to stop the container." +docker run -p "$APP_PORT:$APP_PORT" "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_TAG"