All materials
Dockerfile
Dockerfile
FROM python:3.11
# Database credentials hardcoded -- HARD-ML.3 target
ENV DATABASE_URL=postgresql://kabylie:kabylie_gold_2024@postgres:5432/orders
WORKDIR /app
COPY app/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app/ .
EXPOSE 5000
# Running as root -- HARD-ML.1 target (USER root is the default)
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--access-logfile", "-", "app:app"]