| FROM php:8.2-apache | |
| # Copy the application | |
| COPY . /var/www/html/ | |
| # Enable mod_rewrite and allow .htaccess overrides | |
| RUN a2enmod rewrite \ | |
| && sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf | |
| # Change Apache port to 7860 (required by HF Spaces) | |
| RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf \ | |
| && sed -i 's/80/7860/g' /etc/apache2/sites-available/000-default.conf | |
| EXPOSE 7860 | |
| CMD ["apache2-foreground"] |