From faa5046517c60a5b5890104b7e9539f27da82bb4 Mon Sep 17 00:00:00 2001 From: Muhammad Haroon Date: Mon, 8 Apr 2024 05:48:47 +0500 Subject: [PATCH 1/6] added requirements.txt --- db.sqlite3 | Bin 139264 -> 143360 bytes requirements.txt | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 requirements.txt diff --git a/db.sqlite3 b/db.sqlite3 index 9bbb45966a0647d682a6f038e8da2f2bd662ef2e..4ec98ffb8b891ceb36f26156ba53d17847545bac 100644 GIT binary patch delta 854 zcmZ`%OH30{6n$@oeg@ik{A&@Ud}0DfnNEKcLS%pzP!t3bLtRXV&d?S*Q|J%sMhJ%V7TrV7(IGm>w=hnmUhbJJLkECXAN4fq>n%Fc3Dx(enr;K83Chf8 z$YxmNQOZsv>LA$z#YI7hBzQR%Neby$LP<5eV#-2#PzeBqjVm@}h0KmdKNH@GX&r=TSYmPk*Hk>BB;22sV)>@;<1()&)UK(T`{|Vc4%PKLV`3 zS$$X0R9z~6(=}qSbacSmZJV7V>QBQt*s4~Q*QlMw6)hsdE82tvZQ3Uhu4y|WtS#^o zysIO~UxkkxWQmKLzCZ5WX<;7sPFm&pzt#QwYaO2UbF+TiEH^aax3!jx+K({&a4Lm{ zQ_!YFjg&+8H;?czpl2;4VMYctkv<&G<>sJ9rlK4n3N0vH56i z^c*4I+OQI4urUBAi`h$2oOyYENnBw0R8(Nyo^~(GU}+Cdjt_B}(TQZxy%HZ=&Ba)c zcTsE)Eam2{NhK7A zll2TnWFZ!}H-!`ODgJDq%V+m^yk2iFUYQ*ufsO%Q(-XWdpOJ+kEwB`ZFppX Hm}~SmhAi#t delta 763 zcmaKq-Afcv7{<>zvpcivZu@5HE{oZY8A186Gdr`nZisH822yF^g-Gm}`#kV|tb7Zsd=0F( zH`ftD=T9E?e(iaW}wYdCM0LGYRK)@+{jH^D`25cET;aoM(($gNF7npSMlbv>LGuGfAx8Q;d?C zU(!nz#nw&3if;+N0*hf1!KCLp2F~Q0%@;iJ1uz^U?>4#3D+k~nZgg$7GCRyO;xaS% zGpXW>5RGIJs$VYP4kp}mfX+;HW277G2)$FpS6NYFW1|V@OQ?ggCWcUG?NW-1B@*~? zr}K+@Mdwv~!}%HLa)cnz?<$_Bu8R5kqK23K#Fwn^=I}0|gA=%8bhUkmTa68KvF>iX zrrFBeqV`8|wdLF~75_#X$uw!=c#lz=xz@<6RY#5$UH@13kHtm-578$kz8$GOI1$Ec zr4fz}7w}Tu1CQ2Ed0i(ki(mt0BcDD-NC?I>e$lLIylwJY*;Z15IM6GmdW94(X0oE3 zl{0;!l$J&DUnHHm&9I2(fxL?xP4(!&CftpTdpj}^q2uSs65ZOvEj}?Vr6}y-=ybn) zMW``^L;Y4RhpsEdvTe?3m3hsw`RV(rVry2;D)Z_>#WbtDVyJvoH*}k?XeFhh>PCsT ztp&YeTMcH}da Date: Mon, 8 Apr 2024 10:39:55 +0500 Subject: [PATCH 2/6] Create Dockerfile for CICD Pipeline Creation --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..0a051e97 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3 +RUN pip install django==5.0.4 +COPY . . +RUN python manage.py migrate +CMD ["python","manage.py","runserver","0.0.0.0:8001"] \ No newline at end of file From c0c626b4f8ab2ba581bc478b94e197a7024c2812 Mon Sep 17 00:00:00 2001 From: Muhammad Haroon Date: Mon, 8 Apr 2024 11:36:38 +0500 Subject: [PATCH 3/6] Allowing Host --- todoApp/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/todoApp/settings.py b/todoApp/settings.py index 76bff1be..9267fa16 100644 --- a/todoApp/settings.py +++ b/todoApp/settings.py @@ -25,7 +25,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ["192.168.100.199"] # Application definition From 7ba39dba495f507d7cd4797d14566cbdfe5b4a9d Mon Sep 17 00:00:00 2001 From: Muhammad Haroon Date: Tue, 9 Apr 2024 17:09:44 +0500 Subject: [PATCH 4/6] Modification in html content --- todos/templates/todos/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/todos/templates/todos/index.html b/todos/templates/todos/index.html index bd2b69c4..81530542 100644 --- a/todos/templates/todos/index.html +++ b/todos/templates/todos/index.html @@ -14,6 +14,9 @@

Todo List

+

+ Deployed with the help of docker and jenkins. +

From 120507a13904a8fcb95165b0e940d79bfe2cfb95 Mon Sep 17 00:00:00 2001 From: Muhammad Haroon Date: Wed, 24 Apr 2024 11:20:18 +0500 Subject: [PATCH 5/6] k8s folder created --- todoApp/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/todoApp/settings.py b/todoApp/settings.py index 9267fa16..11e25bf6 100644 --- a/todoApp/settings.py +++ b/todoApp/settings.py @@ -25,7 +25,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = ["192.168.100.199"] +ALLOWED_HOSTS = ["192.168.100.199","localhost"] # Application definition From d0f007328427ed808a823f2af86b9ba71bdc8e96 Mon Sep 17 00:00:00 2001 From: Muhammad Haroon Date: Wed, 8 May 2024 10:29:58 +0500 Subject: [PATCH 6/6] added pod.yaml file for kubernetes pod creation --- k8s/pod.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 k8s/pod.yaml diff --git a/k8s/pod.yaml b/k8s/pod.yaml new file mode 100644 index 00000000..7a907c93 --- /dev/null +++ b/k8s/pod.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Pod +metadata: + name: todo-app +spec: + containers: + - name: todo-app + image: muhammadharoon26/todo-app:v1 + ports: + - containerPort: 8000