tebrox / Dockerfile
understanding's picture
Update Dockerfile
968eeaa verified
raw
history blame
682 Bytes
# Use slim image for small size
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libsqlite3-dev \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy app files
COPY . /app/
# Create necessary directories and set permissions
RUN mkdir -p ./downloads ./logs ./data && \
chmod -R 777 ./downloads ./logs ./data
# Install Python deps
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose FastAPI port
EXPOSE 7860
# Start FastAPI app (main.py will start both bot and web server)
CMD ["python", "main.py"]