updated build script

This commit is contained in:
2026-01-04 17:17:00 -05:00
parent 30c8120330
commit 06ae412bff

13
build_and_push.sh Normal file → Executable file
View File

@@ -3,15 +3,22 @@
# Set the name of the Docker Compose file # Set the name of the Docker Compose file
COMPOSE_FILE="docker-compose.build.yml" COMPOSE_FILE="docker-compose.build.yml"
# Build the images using docker-compose # Build the images using docker compose
echo "Building Docker images..." echo "Building Docker images..."
docker-compose -f $COMPOSE_FILE build docker compose -f $COMPOSE_FILE build
# Check if the build was successful # Check if the build was successful
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "Build successful. Pushing images to Docker registry..." echo "Build successful. Pushing images to Docker registry..."
# Push the images to the registry # Push the images to the registry
docker-compose -f $COMPOSE_FILE push docker compose -f $COMPOSE_FILE push
# Check if the push was successful
if [ $? -eq 0 ]; then
echo "Push successful."
else
echo "Push failed."
exit 1
fi
else else
echo "Build failed. Aborting push to registry." echo "Build failed. Aborting push to registry."
exit 1 exit 1