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 diff --git a/db.sqlite3 b/db.sqlite3 index 9bbb4596..4ec98ffb 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ 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 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..a3ade15e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +asgiref==3.8.1 +Django==5.0.4 +sqlparse==0.4.4 +tzdata==2024.1 diff --git a/todoApp/settings.py b/todoApp/settings.py index 76bff1be..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 = [] +ALLOWED_HOSTS = ["192.168.100.199","localhost"] # Application definition 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. +