Docker Support: Added Dockerfile, updated DB connection for ENVs, and documented Docker usage in README

This commit is contained in:
Gemini Agent
2025-12-05 16:53:37 +00:00
parent ae9ab01421
commit 1d9424046e
3 changed files with 66 additions and 23 deletions

View File

@@ -1,4 +1,23 @@
FROM php:8.2-apache
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
# Enable mod_rewrite for cleaner URLs if needed, though not strictly requested, it's good practice.
# Install dependencies
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd mysqli
# Enable Apache rewrite module
RUN a2enmod rewrite
# Copy application source
COPY . /var/www/html/
# Set permissions for upload directory
RUN mkdir -p /var/www/html/uploads/images && \
chown -R www-data:www-data /var/www/html/uploads && \
chmod -R 755 /var/www/html/uploads
# Expose port 80
EXPOSE 80