Updated with folder path
This commit is contained in:
parent
d219faa147
commit
f9b7fad33b
@ -3,14 +3,13 @@
|
||||
# Determine the current directory (where the script is located)
|
||||
script_directory="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||
|
||||
# Navigate to the root of the repository
|
||||
repository_root="$script_directory/.."
|
||||
# Use the 'find' command to locate the 'docker-compose.yml' file within the repository directory
|
||||
composeFile=$(find "$script_directory/.." -name "docker-compose.yml" -type f | head -n 1)
|
||||
|
||||
# Specify the relative path to the docker-compose.yml
|
||||
relative_path="DamageAssesmentApi/docker-compose.yml"
|
||||
|
||||
# Combine the repository root directory with the relative path to get the full path to docker-compose.yml
|
||||
composeFile="$repository_root/$relative_path"
|
||||
if [ -z "$composeFile" ]; then
|
||||
echo "docker-compose.yml not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# List of services to build, tag, and push
|
||||
services=(
|
||||
@ -30,7 +29,7 @@ docker login dadeschoolscontainerregistry.azurecr.io -u dadeSchoolsContainerRegi
|
||||
# Loop through the services and build, tag, and push
|
||||
for service in "${services[@]}"; do
|
||||
# Build the service
|
||||
docker-compose -f "$composeFile" build #"$service"
|
||||
docker-compose -f "$composeFile" build "$service"
|
||||
|
||||
# Tag the image for ACR
|
||||
docker tag "$service" "dadeschoolscontainerregistry.azurecr.io/$service"
|
||||
|
Loading…
Reference in New Issue
Block a user