FROM php:8.2-apache

# Install PDO MySQL
RUN docker-php-ext-install pdo pdo_mysql

# Enable Apache mod_rewrite
RUN a2enmod rewrite

# Set working directory
WORKDIR /var/www/html

# Adjust permissions for uploads and reports
RUN mkdir -p uploads reports && chmod -R 777 uploads reports
