diff --git a/Dockerfile b/Dockerfile index 007d7e2..b8d417a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,30 @@ -FROM php:8.0-apache +FROM node:18 AS builder + +RUN apt-get update && apt-get install -y \ + php \ + php-cli \ + php-zip \ + unzip + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +WORKDIR /app -WORKDIR /var/www/html +COPY . . + +RUN composer install +RUN yarn install + +RUN chmod +x build_artifacts.sh +RUN ./build_artifacts.sh + +FROM php:8.0-apache -ADD . . +COPY --from=builder /app/ /var/www/html/ RUN chown -R www-data:www-data /var/www/html \ && chmod -R 755 /var/www/html -RUN echo Listen 8080 > /etc/apache2/ports.conf +RUN echo "Listen 8080" > /etc/apache2/ports.conf EXPOSE 8080 \ No newline at end of file