net-speed-pro / Dockerfile
Trae Assistant
Switch to Gunicorn for better performance and stability
bc26cfc
raw
history blame contribute delete
458 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy code
COPY . .
# Create non-root user for security
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
EXPOSE 7860
# Use Gunicorn for production-grade performance
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--workers", "2", "--threads", "4", "--timeout", "120"]