Skip to content

Commit

Permalink
correct generate deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
heinpa committed Jun 28, 2024
1 parent b39bc45 commit ee48f92
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions service_config/generate_deployment_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ do
done
fi

echo 'echo "Stopping and removing old container"' >> $outfile
echo 'docker stop $container_name || true && docker rm $container_name || true' >> $outfile
echo 'echo "Pulling image: $DOCKER_IMAGE_NAME"' >> $outfile
echo 'docker pull "$image:$tag"' >> $outfile
echo 'echo "Starting container: $DOCKER_CONTAINER_NAME"' >> $outfile
echo "echo 'Stopping and removing old container'" >> $outfile
echo "docker stop $container_name || true && docker rm $container_name || true" >> $outfile
echo "echo 'Pulling image: $DOCKER_IMAGE_NAME'" >> $outfile
echo "docker pull $image:$tag" >> $outfile
echo "echo 'Starting container: $DOCKER_CONTAINER_NAME'" >> $outfile

if [ ! -z "${volume_mappings}" ];then
echo 'echo "docker run --restart=always -d -p $port_mapping $volume_mappings --env-file $env_files/$env_file --name $container_name $image:$tag" ' >> $outfile
echo '#docker run --restart=always -d -p $port_mapping $volume_mappings --env-file $env_files/$env_file --name $container_name "$image:$tag" ' >> $outfile
echo "echo 'docker run --restart=always -d -p $port_mapping $volume_mappings --env-file $env_files/$env_file --name $container_name $image:$tag'" >> $outfile
echo "#docker run --restart=always -d -p $port_mapping $volume_mappings --env-file $env_files/$env_file --name $container_name $image:$tag" >> $outfile
else
echo 'echo "docker run --restart=always -d -p $port_mapping --env-file $env_files/$env_file --name $container_name $image:$tag" ' >> $outfile
echo '#docker run --restart=always -d -p $port_mapping --env-file $env_files/$env_file --name $container_name "$image:$tag" ' >> $outfile
echo "echo 'docker run --restart=always -d -p $port_mapping --env-file $env_files/$env_file --name $container_name $image:$tag'" >> $outfile
echo #docker run --restart=always -d -p $port_mapping --env-file $env_files/$env_file --name $container_name $image:$tag" >> $outfile
fi

cnt=$(($cnt + 1))
Expand Down

0 comments on commit ee48f92

Please sign in to comment.