-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (31 loc) · 864 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM php:8.3-apache
# Add composer and node
COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
COPY --from=node:21 /usr/local/bin /usr/local/bin
COPY --from=node:21 /usr/local/lib/node_modules /usr/local/lib/node_modules
# Install system and PHP dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
curl \
zip \
libpng-dev \
libonig-dev \
libxml2-dev \
libzip-dev \
default-mysql-client && \
a2enmod rewrite && \
docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip intl
# Set working directory and copy the project
WORKDIR /var/www/html
COPY . .
# Install dependencies
RUN composer install
RUN npm install
# Set permissions
RUN chown -R www-data:www-data /var/www/html
EXPOSE 80
EXPOSE 5173
EXPOSE 8000
# Start Apache in the foreground
CMD ["npm", "run", "start"]