Skip to content

Commit

Permalink
updated dockerfile to run the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
saravahdatipour committed Nov 8, 2024
1 parent 962c512 commit 75f5beb
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 75f5beb

Please sign in to comment.