Skip to content

Add Dockerfile and .dockerignore for backend container image#14

Open
echska wants to merge 1 commit into
mainfrom
codex/fix-missing-dockerfile-error-eoy9uk
Open

Add Dockerfile and .dockerignore for backend container image#14
echska wants to merge 1 commit into
mainfrom
codex/fix-missing-dockerfile-error-eoy9uk

Conversation

@echska
Copy link
Copy Markdown
Owner

@echska echska commented May 12, 2026

Motivation

  • Provide a reproducible container image for the backend service and reduce image size by excluding unnecessary files from the build context.

Description

  • Add a .dockerignore file that excludes VCS, Python caches, frontend node_modules and build output, and other unnecessary files from the Docker build context.
  • Add a Dockerfile based on python:3.12-slim that sets PYTHONDONTWRITEBYTECODE and PYTHONUNBUFFERED, installs dependencies from parental-control-system/backend/requirements.txt, copies the backend source, creates a non-root appuser, exposes port 5000, and starts the app with gunicorn using CMD ["sh", "-c", "gunicorn --bind 0.0.0.0:${PORT:-5000} main:app --workers 2 --threads 4 --timeout 60"].

Testing

  • No automated tests were run for this change.

Codex Task

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant