# Simplified Dockerfile using requirements.txt FROM python:3.11-slim # Set environment variables ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ PIP_NO_CACHE_DIR=1 \ PIP_DISABLE_PIP_VERSION_CHECK=1 # Install system dependencies RUN apt-get update && apt-get install -y \ vim-common build-essential \ curl \ ffmpeg \ libmagic1 \ libpq-dev \ pkg-config \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Copy requirements and install Python dependencies COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Create necessary directories RUN mkdir -p /app/data /app/logs # Set environment ENV PYTHONPATH=/app # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl -f http://localhost:15100/health || exit 1 # Expose ports EXPOSE 15100 9090 # Default command CMD ["python", "start_my_network.py"]