FROM php:8.3-apache

RUN docker-php-ext-install pdo_mysql sockets
RUN a2enmod rewrite

WORKDIR /var/www/html
COPY . /var/www/html
COPY docker/apache.conf /etc/apache2/sites-available/000-default.conf

RUN mkdir -p /var/www/html/storage/logs /var/www/html/public/uploads \
    && chown -R www-data:www-data /var/www/html/storage /var/www/html/public/uploads

EXPOSE 80
