From e476598c1a46f8fbd1deea8edfd95ec1a0483775 Mon Sep 17 00:00:00 2001 From: David Leclerc Date: Thu, 30 Nov 2023 12:37:06 +0100 Subject: [PATCH] Integration with Dockerhub. --- build.sh | 24 ++++++++++++++++++++++++ docker-compose.yml | 8 ++++---- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..51f548d --- /dev/null +++ b/build.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Get the directory containing the script +dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Change the current directory to the apps directory +cd "$dir/Apps" + +# Define constant image details +user="dleclercpro" +app="eda-playground" +release="v1.1.0" + +# Build app images +docker build -t $user/$app-broker:$release -f BrokerApp.Dockerfile . +docker build -t $user/$app-order:$release -f OrderApp.Dockerfile . +docker build -t $user/$app-payment:$release -f PaymentApp.Dockerfile . +docker build -t $user/$app-delivery:$release -f DeliveryApp.Dockerfile . + +# Push app images to Dockerhub +docker push $user/$app-broker:$release +docker push $user/$app-order:$release +docker push $user/$app-payment:$release +docker push $user/$app-delivery:$release \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 8f9150e..d2d82b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.8' services: broker: container_name: broker-app - image: eda-playground/broker + image: dleclercpro/eda-playground-broker:v1.1.0 build: context: ./Apps dockerfile: BrokerApp.Dockerfile @@ -16,7 +16,7 @@ services: order: container_name: order-app - image: eda-playground/order + image: dleclercpro/eda-playground-order:v1.1.0 build: context: ./Apps dockerfile: OrderApp.Dockerfile @@ -29,7 +29,7 @@ services: payment: container_name: payment-app - image: eda-playground/payment + image: dleclercpro/eda-playground-payment:v1.1.0 build: context: ./Apps dockerfile: PaymentApp.Dockerfile @@ -42,7 +42,7 @@ services: delivery: container_name: delivery-app - image: eda-playground/delivery + image: dleclercpro/eda-playground-delivery:v1.1.0 build: context: ./Apps dockerfile: DeliveryApp.Dockerfile