Spaces:
Sleeping
Sleeping
File size: 696 Bytes
1860b85 6a95647 1860b85 6a95647 1860b85 6a95647 1860b85 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | 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"] |