Skip to content

Commit

Permalink
fixed issue when filepaths for config has spaces (#19)
Browse files Browse the repository at this point in the history
* fixed issue when filepaths for config has spaces

* improved status messages
  • Loading branch information
michaelkamprath authored May 11, 2020
1 parent 857cf00 commit f412bc8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions deployment-scripts/local-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

print_help_and_exit()
{
echo "Usage: "
Expand All @@ -19,6 +20,7 @@ build_docker_image_locally()
if [ $RTMP_SERVER_DOCKER_IMAGE_NAME == $DEFAULT_DOCKER_HUB_IMAGE_NAME ]; then
RTMP_SERVER_DOCKER_IMAGE_NAME="multistreaming-server:latest"
fi
echo "Building Docker image '${RTMP_SERVER_DOCKER_IMAGE_NAME}'"
docker build -t $RTMP_SERVER_DOCKER_IMAGE_NAME $BASEDIR/../multistreaming-server/
}

Expand Down Expand Up @@ -54,15 +56,14 @@ fi
if [ -z $RTMP_SERVER_CONFIG_FILEPATH ]; then
echo "You must define a filepath to the streaming server configuration JSON file. Use the -c option."
fi
echo "RTMP_SERVER_DOCKER_IMAGE_NAME = $RTMP_SERVER_DOCKER_IMAGE_NAME"

#
echo "Launching $RTMP_SERVER_DOCKER_IMAGE_NAME Docker image."
config_file_absolute_path="$(cd "$(dirname "$RTMP_SERVER_CONFIG_FILEPATH")"; pwd)/$(basename "$RTMP_SERVER_CONFIG_FILEPATH")"
echo "Launching $RTMP_SERVER_DOCKER_IMAGE_NAME Docker image with config at '${config_file_absolute_path}'."
docker_proc_id=$( \
docker run -d -p 80:80 -p 1935:1935 \
--env MULTISTREAMING_PASSWORD=${RTMP_SERVER_STREAM_PASSWORD} \
-v ${config_file_absolute_path}:/rtmp-configuation.json \
-v "${config_file_absolute_path}":/rtmp-configuation.json \
${RTMP_SERVER_DOCKER_IMAGE_NAME} \
)
docker_short_proc_id=$(echo $docker_proc_id | cut -c1-12)
Expand Down

0 comments on commit f412bc8

Please sign in to comment.