Skip to content
Open
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
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ARG PYTHON_VERSION=3.8

FROM python:${PYTHON_VERSION} AS base

FROM python:${PYTHON_VERSION}-slim
Comment on lines +3 to +5

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 task requires the Dockerfile to have a proper build stage and run stage (checklist #5), but here you only define a base stage and then start a new unrelated python:${PYTHON_VERSION}-slim stage; consider explicitly using the build stage (e.g. FROM base AS build then FROM python:${PYTHON_VERSION}-slim AS run and copy artifacts from build).


Comment on lines +5 to +6

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 Docker Hub requirement specifies the image should be pushed with tag 1.0.0 (todoapp:1.0.0, checklist #11), but the build command here does not include that tag; consider documenting building todoapp:1.0.0 and tagging/pushing to your iondan587/todoapp:1.0.0 repository.

ENV PYTHONUNBUFFERED=1

WORKDIR /app
Comment on lines +5 to +9

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 instructions mention how to build and run the container, but they do not explain tagging the image as 1.0.0 and pushing it to Docker Hub, which is required by the task (checklist #11); add commands like docker tag and docker push to cover this.


COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY . .
Comment on lines +13 to +15

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 description explicitly requires running database migrations as a RUN instruction in the Dockerfile (checklist #7), but there is no RUN python manage.py migrate here; you should add it after copying the project and installing dependencies.


EXPOSE 8080

CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
12 changes: 12 additions & 0 deletions INSTRUCTION.md/instruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Инструкция по запуску ToDo App

Ссылка на Docker Hub: https://hub.docker.com/r/iondan587/todoapp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You declare a base stage but never use it; checklist item #5 requires distinct build and run stages, so you should perform dependency installation or build steps in this base stage and then copy results into the final runtime stage instead of reinstalling everything in the second stage.


## Как собрать образ:
docker build --build-arg PYTHON_VERSION=3.10 -t todoapp .
Comment on lines +5 to +6

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 Docker Hub link and basic instructions are good, but checklist item #20 expects full instructions for building and running the container consistent with the Dockerfile, including the fact that database migrations are handled via a RUN instruction; consider clarifying that migrations occur during docker build or documenting any extra steps if needed.


## Как запустить контейнер:
docker run -p 8080:8080 todoapp

## Как открыть в браузере:
Перейти по адресу http://localhost:8080
Loading