From 506e9699ce2e1627bbcfe9de8bcaa9b93564df4c Mon Sep 17 00:00:00 2001 From: Edwin Eames Date: Mon, 28 Jul 2025 12:05:31 -0400 Subject: [PATCH] added script --- build_and_push.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 build_and_push.sh diff --git a/build_and_push.sh b/build_and_push.sh new file mode 100644 index 0000000..2999425 --- /dev/null +++ b/build_and_push.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Set the name of the Docker Compose file +COMPOSE_FILE="docker-compose.build.yml" + +# Build the images using docker-compose +echo "Building Docker images..." +docker-compose -f $COMPOSE_FILE build + +# Check if the build was successful +if [ $? -eq 0 ]; then + echo "Build successful. Pushing images to Docker registry..." + # Push the images to the registry + docker-compose -f $COMPOSE_FILE push +else + echo "Build failed. Aborting push to registry." + exit 1 +fi + +echo "Images have been built and pushed to the Docker registry."