d8a6e8d7am / Dockerfile
gs517's picture
Initial deploy via automation script
66d86d3 verified
Raw
History Blame Contribute Delete
807 Bytes
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"]