diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/devops_todolist.iml b/.idea/devops_todolist.iml new file mode 100644 index 0000000..8555590 --- /dev/null +++ b/.idea/devops_todolist.iml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4b96df2 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..c3d91e6 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a96f461 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +ARG PYTHON_VERSION=3.12 +FROM python:${PYTHON_VERSION}-slim AS build + +WORKDIR /build + +COPY requirements.txt . +COPY . . + +FROM python:${PYTHON_VERSION}-slim as run + +ENV PYTHONUNBUFFERED=1 + +WORKDIR /app + +COPY --from=build /build /app + +RUN pip install --no-cache-dir -r requirements.txt +RUN python manage.py migrate + +CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"] \ No newline at end of file diff --git a/INSTRUCTION.md b/INSTRUCTION.md new file mode 100644 index 0000000..fbbe0ec --- /dev/null +++ b/INSTRUCTION.md @@ -0,0 +1,14 @@ +Local Installation(Use Python 3.8+) + +1) pip install -r requirements.txt +2) python manage.py migrate +3) python manage.py runserver 0.0.0.0:8080 + + +DockerHub - https://hub.docker.com/repository/docker/vanyas627/todoapp/general + +Image: docker build -t vanyas627/todoapp:1.0.0 . + +Run Container: docker run -p 8080:8080 vanyas627/todoapp:1.0.0 + +Open the app in browser: http://localhost:8080 \ No newline at end of file