modification of code and loggger apply and changes of update from.

This commit is contained in:
2026-02-18 18:00:20 +05:30
parent 0ba78a0bd1
commit 63bcbeb9a2
12 changed files with 361 additions and 138 deletions

View File

@@ -1,22 +1,36 @@
# -------------- development's Dockerfile ----------------
# FROM python:3.11-slim
# # Prevent Python buffering
# ENV PYTHONDONTWRITEBYTECODE=1
# ENV PYTHONUNBUFFERED=1
# WORKDIR /app
# # Install system deps (if needed later)
# RUN apt-get update && apt-get install -y \
# build-essential \
# && rm -rf /var/lib/apt/lists/*
# COPY requirements.txt .
# RUN pip install --no-cache-dir -r requirements.txt
# COPY . .
# EXPOSE 5000
# CMD ["python", "main.py"]
# -------------- Production Dockerfile ----------------
FROM python:3.11-slim
# Prevent Python buffering
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Install system deps (if needed later)
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["python", "main.py"]
EXPOSE 5010
CMD ["gunicorn", "--bind", "0.0.0.0:5010", "main:app"]
# end