File size: 909 Bytes
8251b6b 2c1d5ac 7297cef 373f302 7297cef 8251b6b 7297cef 6ee80dc e05ecd6 8251b6b 7297cef 8251b6b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Dockerfile (نسخه نهایی با تنظیم خودکار max-requests)
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container at /app
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application's code (including start.sh)
COPY . .
# Create a writable directory for temporary files
RUN mkdir -p /app/tmp && chmod 777 /app/tmp
# ✅✅✅ تغییر کلیدی: اسکریپت ورودی را قابل اجرا میکنیم ✅✅✅
RUN chmod +x /app/start.sh
# Expose the port the app runs on
EXPOSE 7860
# --- دستور نهایی که اسکریپت ورودی را برای تنظیمات داینامیک اجرا میکند ---
CMD ["/app/start.sh"] |