39 lines
786 B
Docker
39 lines
786 B
Docker
# Development Dockerfile
|
|
FROM python:3.11-slim
|
|
|
|
# Set environment variables
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
FLASK_ENV=development \
|
|
FLASK_DEBUG=1
|
|
|
|
# Set work directory
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
g++ \
|
|
libc6-dev \
|
|
libffi-dev \
|
|
libssl-dev \
|
|
curl \
|
|
git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python dependencies
|
|
COPY requirements.txt requirements-dev.txt ./
|
|
RUN pip install --no-cache-dir -r requirements-dev.txt
|
|
|
|
# Copy project
|
|
COPY . .
|
|
|
|
# Create necessary directories
|
|
RUN mkdir -p data/database data/logs data/cache data/temp/downloads
|
|
|
|
# Expose port
|
|
EXPOSE 5000
|
|
|
|
# Development command
|
|
CMD ["python", "src/server/app.py"] |