Spaces:
Sleeping
Sleeping
| FROM python:3.9-slim | |
| # Install PHP and required extensions | |
| RUN apt-get update && apt-get install -y \ | |
| php \ | |
| php-mysql \ | |
| php-common \ | |
| php-mbstring \ | |
| php-xml \ | |
| php-zip \ | |
| php-curl \ | |
| && 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 files | |
| COPY . . | |
| # Configure PHP | |
| RUN echo "display_errors = On" >> /etc/php/7.4/cli/php.ini \ | |
| && echo "error_reporting = E_ALL" >> /etc/php/7.4/cli/php.ini | |
| # Expose port | |
| EXPOSE 7860 | |
| # Start the application | |
| CMD ["python", "app.py"] |