Skip to content

Docker setup for ToDo app#297

Open
verteiger wants to merge 5 commits into
mate-academy:mainfrom
verteiger:main
Open

Docker setup for ToDo app#297
verteiger wants to merge 5 commits into
mate-academy:mainfrom
verteiger:main

Conversation

@verteiger
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Review Summary

The implementation has critical tag mismatches that violate explicit task requirements. Task requirement #8 requires the image to be named todoapp, and requirement #9 requires it to be tagged with 1.0.0. However, the Dockerfile and INSTRUCTION.md use verteiger/todoapp:latest throughout, which fails both requirements. You need to: (1) Change the build tag from -t verteiger/todoapp:latest to -t todoapp:1.0.0 in the Dockerfile, (2) Update all references in INSTRUCTION.md from todoapp:latest to todoapp:1.0.0 in build, run, tag, push commands, and docker-compose service, (3) Verify the Docker Hub repository name matches your actual account. The technical implementation (multi-stage build, ARG, ENV PYTHONUNBUFFERED=1, migration RUN, runserver with 0.0.0.0:8080) is correct, but the tag naming must be fixed to meet the requirements.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment thread Dockerfile

### Runtime stage
FROM python:${PYTHON_VERSION}-slim

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 image is built with tag verteiger/todoapp:latest but task requirement #8 specifies it should be named todoapp. Change -t verteiger/todoapp:latest to -t todoapp:1.0.0 to match the requirement.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile
gcc \
python3-dev \
libbz2-dev \
libssl-dev \
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 image tag mentioned is latest but task requirement #9 requires the image to be pushed with 1.0.0 tag (todoapp:1.0.0). Update all references from latest to 1.0.0.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile

WORKDIR /app

# Create non-root user
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Image tag should be 1.0.0 instead of latest to match task requirement #9.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile
RUN chown -R appuser:appuser /app

# Switch to non-root user
USER appuser
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Image tag should be 1.0.0 instead of latest to match task requirement #9.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile

RUN python manage.py migrate

# Application port
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Image tag should be 1.0.0 instead of latest to match task requirement #9.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
docker pull verteiger/todoapp:latest

2. Run the container, mapping the container port 8080 to a host port (example uses host port 8000):

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 pull command uses todoapp:latest but should reference todoapp:1.0.0 to match the task requirement for the specific tag.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
docker build -t verteiger/todoapp:latest .

2. Run the locally-built image:

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 run command uses todoapp:latest but should use todoapp:1.0.0 to match the specified tag in the task requirements.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
docker login

2. Tag the image (if needed):

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 tag command uses todoapp:latest but should be todoapp:1.0.0 as specified in the task requirement.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
docker tag verteiger/todoapp:latest verteiger/todoapp:latest

3. Push:

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 push command uses todoapp:latest but should push todoapp:1.0.0 to match the task requirement.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
```yaml
version: '3.8'
services:
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.

The docker-compose service uses todoapp:latest image tag but should use todoapp:1.0.0 for consistency with the task requirement.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Author

@verteiger verteiger left a comment

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile

FROM python:${PYTHON_VERSION}-slim AS builder

WORKDIR /app
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile
gcc \
python3-dev \
libbz2-dev \
libssl-dev \
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile

### Runtime stage
FROM python:${PYTHON_VERSION}-slim

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile

WORKDIR /app

# Create non-root user
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread Dockerfile
RUN chown -R appuser:appuser /app

# Switch to non-root user
USER appuser
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
docker build -t verteiger/todoapp:latest .

2. Run the locally-built image:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
docker build -t verteiger/todoapp:latest .

2. Run the locally-built image:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
docker login

2. Tag the image (if needed):

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
docker tag verteiger/todoapp:latest verteiger/todoapp:latest

3. Push:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

Comment thread INSTRUCTION.md
```yaml
version: '3.8'
services:
todoapp:
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fixed

@verteiger verteiger closed this May 17, 2026
@verteiger
Copy link
Copy Markdown
Author

pls check

@verteiger verteiger reopened this May 17, 2026
@verteiger
Copy link
Copy Markdown
Author

@mateacademy-ai-mentor pls check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants