Skip to content
Open

Done! #313

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/devops_todolist.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

ARG PYTHON_VERSION=3.8
FROM python:${PYTHON_VERSION} AS builder

WORKDIR /app

COPY requirements.txt .
RUN pip install -r requirements.txt
Comment on lines +7 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The INSTRUCTION.md build command tags the image as 'todoapp', but the run command expects '1ntact/todoapp:1.0.0'. To match the instructions, the build command should be: docker build -t 1ntact/todoapp:1.0.0 .



ARG PYTHON_VERSION=3.8
FROM python:${PYTHON_VERSION}

ENV PYTHONUNBUFFERED=1

WORKDIR /app

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded path /usr/local/lib/python3.8/site-packages uses python3.8 specifically. If PYTHON_VERSION changes (e.g., to 3.9 or 3.10), this path will be incorrect and cause the app to fail. Consider making this path dynamic or using a different approach to copy dependencies.

COPY --from=builder /usr/local/lib /usr/local/lib
COPY . .

RUN python manage.py migrate

EXPOSE 8080

CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
13 changes: 13 additions & 0 deletions INSTRUCTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ToDo App — Docker Instructions

## Docker Hub
https://hub.docker.com/r/1ntact/todoapp

## Build the image
docker build -t 1ntact/todoapp:1.0.0 .

## Run the container
docker run -d -p 8080:8080 --name todoapp 1ntact/todoapp:1.0.0

## Access the application
Open your browser and go to: http://localhost:8080
Loading