Spaces:
Running
Running
| FROM php:8.2-apache | |
| # Install dependencies if needed (curl is usually included but good to be sure) | |
| # RUN docker-php-ext-install curl | |
| # Copy application files | |
| # Copy application files | |
| COPY . /var/www/html/ | |
| # Configure Apache to listen on port 7860 (Hugging Face requirement) | |
| RUN sed -i 's/80/7860/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf | |
| # Set working directory | |
| WORKDIR /var/www/html/ | |
| # Ensure domain_cache.txt exists and is writable | |
| RUN touch domain_cache.txt && \ | |
| chown www-data:www-data domain_cache.txt && \ | |
| chmod 664 domain_cache.txt | |
| # Copy and set up entrypoint | |
| COPY entrypoint.sh /usr/local/bin/entrypoint.sh | |
| RUN chmod +x /usr/local/bin/entrypoint.sh | |
| # Use the entrypoint script | |
| ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | |