fix: Dockerfile COPY path and missing CMD #101
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#101
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/dockerfile-copy-cmd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Container is crash-looping after the 2026.3.17 release. Root cause: the Dockerfile optimization introduced two bugs:
COPY ./app /app/app— wrong destination path, doesn't matchWORKDIR /usr/src/app. App code never lands in the working directory.CMD— container inheritspython3(no-op) from the Python base image and exits immediately with code 0.Fix
COPY ./app /app/app→COPY ./app /usr/src/app/appCMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]AI Code Review
Files Reviewed
Dockerfile(modified)Findings
Correctness
WORKDIR /usr/src/appmeans pip and playwright installs land there. Foruvicorn app.main:appto resolve the module, the app package must be at/usr/src/app/app/. The oldCOPY ./app /app/appplaced it at the wrong path entirely.uvicorn app.main:app --host 0.0.0.0 --port 80runs fromWORKDIR /usr/src/app, resolvingapp.mainto/usr/src/app/app/main.py. Port 80 matches the expected container port (mapped to 815 in prod).python3(no-op) from the Python base image." The actual base image istiangolo/uvicorn-gunicorn-fastapi:latest, which has its own CMD (/start.shrunning gunicorn) — not a no-op Python shell. However, the original COPY path was wrong regardless, so that CMD would also have failed with a ModuleNotFoundError. The fix outcome is correct either way.Security
Style & Conventions
fix/branch naming convention.Suggestions
--workers 4) or switching to a plainer Python base image and running gunicorn explicitly in a follow-up.Verdict: APPROVED
Both fixes are correct and necessary. The COPY path aligns with WORKDIR, and the CMD provides the explicit entrypoint needed. Minor: PR description misstates the base image's inherited CMD, but this doesn't affect the fix.
Automated review by Claude PR Reviewer