FROM php:7.2-apache

EXPOSE 80
EXPOSE 443

COPY ./ /var/www/html/

COPY ./ssl/ssl-cert.pem /etc/ssl/certs/ssl-cert.pem
COPY ./ssl/ssl-cert.key /etc/ssl/private/ssl-cert.key

COPY ./000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ./default-ssl.conf /etc/apache2/sites-available/default-ssl.conf

RUN a2enmod rewrite && a2enmod ssl && a2enmod socache_shmcb
RUN a2ensite default-ssl

RUN  chown -R www-data:www-data /var/www/html/

RUN chmod 775 -R /var/www/html/

