-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated dockerfile to run the build script
- Loading branch information
saravahdatipour
committed
Nov 8, 2024
1 parent
962c512
commit 75f5beb
Showing
1 changed file
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |