Spaces:
Sleeping
Sleeping
File size: 867 Bytes
4418888 7e01357 4418888 | 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 | 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 and bot_guard.log exist and are writable
RUN touch domain_cache.txt bot_guard.log && \
chown www-data:www-data domain_cache.txt bot_guard.log && \
chmod 664 domain_cache.txt bot_guard.log
# 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"]
|