From c0b01de1003123549f0dd06d921ef2a2ef260b5f Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Tue, 8 Jul 2025 21:44:23 +0530 Subject: [PATCH 01/12] Update Dockerfile --- day-14/simple-python-app/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day-14/simple-python-app/Dockerfile b/day-14/simple-python-app/Dockerfile index 9c41b8f3c..162e5394a 100644 --- a/day-14/simple-python-app/Dockerfile +++ b/day-14/simple-python-app/Dockerfile @@ -1,5 +1,5 @@ # Base image -FROM python:3.8 +FROM bhavyaf5/python:3.8 # Set the working directory inside the container WORKDIR /app From 9cc9d43d47a97e29cbceebc1cdd1e9ac9e3b60ed Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Tue, 8 Jul 2025 22:23:18 +0530 Subject: [PATCH 02/12] Update Dockerfile --- day-14/simple-python-app/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day-14/simple-python-app/Dockerfile b/day-14/simple-python-app/Dockerfile index 162e5394a..9c41b8f3c 100644 --- a/day-14/simple-python-app/Dockerfile +++ b/day-14/simple-python-app/Dockerfile @@ -1,5 +1,5 @@ # Base image -FROM bhavyaf5/python:3.8 +FROM python:3.8 # Set the working directory inside the container WORKDIR /app From 93e20a2cf9186ad01d84a1eea595870c4eadfa85 Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Tue, 8 Jul 2025 22:43:53 +0530 Subject: [PATCH 03/12] Update buildspec.yml --- day-14/simple-python-app/buildspec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day-14/simple-python-app/buildspec.yml b/day-14/simple-python-app/buildspec.yml index 8cccdf869..5432eb220 100644 --- a/day-14/simple-python-app/buildspec.yml +++ b/day-14/simple-python-app/buildspec.yml @@ -12,11 +12,11 @@ phases: pre_build: commands: - echo "Installing dependencies..." - - pip install -r day-13/simple-python-app/requirements.txt + - pip install -r day-14/simple-python-app/requirements.txt build: commands: - echo "Running tests..." - - cd day-13/simple-python-app/ + - cd day-14/simple-python-app/ - echo "Building Docker image..." - echo "$DOCKER_REGISTRY_PASSWORD" | docker login -u "$DOCKER_REGISTRY_USERNAME" --password-stdin "$DOCKER_REGISTRY_URL" - docker build -t "$DOCKER_REGISTRY_URL/$DOCKER_REGISTRY_USERNAME/simple-python-flask-app:latest" . From 19f315d49021b37adca9e70269dabf09543bbdfe Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Tue, 8 Jul 2025 23:46:28 +0530 Subject: [PATCH 04/12] Update app.py --- day-14/simple-python-app/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/day-14/simple-python-app/app.py b/day-14/simple-python-app/app.py index ed673745b..6ffe9df77 100644 --- a/day-14/simple-python-app/app.py +++ b/day-14/simple-python-app/app.py @@ -9,3 +9,5 @@ def hello(): if __name__ == '__main__': app.run() + + From c4e20e4345dc67cedcf4605ab68029a065b3c422 Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Thu, 10 Jul 2025 01:27:31 +0530 Subject: [PATCH 05/12] add the files for code deploy --- scripts/start_container.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/start_container.sh b/scripts/start_container.sh index c7617d846..7904dd96b 100644 --- a/scripts/start_container.sh +++ b/scripts/start_container.sh @@ -2,7 +2,7 @@ set -e # Pull the Docker image from Docker Hub -docker pull abhishekf5/simple-python-flask-app +docker pull bhavyaf5/simple-python-flask-app # Run the Docker image as a container -docker run -d -p 5000:5000 abhishekf5/simple-python-flask-app +docker run -d -p 5000:5000 bhavyaf5/simple-python-flask-app From 58500a9593d6b5988dd9cd16da73a059ab91d6ca Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Thu, 10 Jul 2025 01:45:59 +0530 Subject: [PATCH 06/12] Update start_container.sh --- scripts/start_container.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/start_container.sh b/scripts/start_container.sh index 7904dd96b..7e69e924e 100644 --- a/scripts/start_container.sh +++ b/scripts/start_container.sh @@ -6,3 +6,5 @@ docker pull bhavyaf5/simple-python-flask-app # Run the Docker image as a container docker run -d -p 5000:5000 bhavyaf5/simple-python-flask-app + + From 742d99a982313280c8609f52b6711e9191fb82f4 Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Thu, 10 Jul 2025 02:06:31 +0530 Subject: [PATCH 07/12] Update stop_container.sh --- scripts/stop_container.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/stop_container.sh b/scripts/stop_container.sh index d85f74e93..a01c6f442 100644 --- a/scripts/stop_container.sh +++ b/scripts/stop_container.sh @@ -2,4 +2,5 @@ set -e # Stop the running container (if any) -echo "Hi" \ No newline at end of file +containerid= `docker ps | awk -F " " '{print $1}'` +docker rm -f $containerid From b01c2b4402d4fcc3ae29f3a9ec1735c84ad29427 Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Thu, 10 Jul 2025 02:15:37 +0530 Subject: [PATCH 08/12] Update stop_container.sh --- scripts/stop_container.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/stop_container.sh b/scripts/stop_container.sh index a01c6f442..69b4099fa 100644 --- a/scripts/stop_container.sh +++ b/scripts/stop_container.sh @@ -4,3 +4,4 @@ set -e # Stop the running container (if any) containerid= `docker ps | awk -F " " '{print $1}'` docker rm -f $containerid + From a493c753fe1a5d66447647b19ca06a28c5bf5d4b Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Thu, 10 Jul 2025 02:16:38 +0530 Subject: [PATCH 09/12] Update start_container.sh --- scripts/start_container.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/start_container.sh b/scripts/start_container.sh index 7e69e924e..01952d205 100644 --- a/scripts/start_container.sh +++ b/scripts/start_container.sh @@ -8,3 +8,6 @@ docker pull bhavyaf5/simple-python-flask-app docker run -d -p 5000:5000 bhavyaf5/simple-python-flask-app + + + From 2d0b1c0dc7671c4af8487a4f145757133d8e2fff Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Thu, 10 Jul 2025 02:17:33 +0530 Subject: [PATCH 10/12] Update app.py --- day-14/simple-python-app/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/day-14/simple-python-app/app.py b/day-14/simple-python-app/app.py index 6ffe9df77..6685ec7c2 100644 --- a/day-14/simple-python-app/app.py +++ b/day-14/simple-python-app/app.py @@ -11,3 +11,7 @@ def hello(): + + + + From 79c31a2a7d818c189e4518e4e240411b2db96113 Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Thu, 10 Jul 2025 02:25:27 +0530 Subject: [PATCH 11/12] Update stop_container.sh --- scripts/stop_container.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/stop_container.sh b/scripts/stop_container.sh index 69b4099fa..b190a34a6 100644 --- a/scripts/stop_container.sh +++ b/scripts/stop_container.sh @@ -2,6 +2,6 @@ set -e # Stop the running container (if any) -containerid= `docker ps | awk -F " " '{print $1}'` +containerid=`docker ps | awk -F " " '{print $1}'` docker rm -f $containerid From 9d295e1a04b81ce444e3417485ea105d3c66c661 Mon Sep 17 00:00:00 2001 From: Bhavya-Djy Date: Thu, 10 Jul 2025 02:30:52 +0530 Subject: [PATCH 12/12] Update stop_container.sh --- scripts/stop_container.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/stop_container.sh b/scripts/stop_container.sh index b190a34a6..07344765d 100644 --- a/scripts/stop_container.sh +++ b/scripts/stop_container.sh @@ -1,7 +1,15 @@ #!/bin/bash set -e -# Stop the running container (if any) -containerid=`docker ps | awk -F " " '{print $1}'` -docker rm -f $containerid +# Get running container IDs +container_ids=$(docker ps -q) + +# Stop and remove if any +if [ -n "$container_ids" ]; then + echo "Stopping and removing containers: $container_ids" + docker rm -f $container_ids +else + echo "No running containers to stop." +fi +