-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 975 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (25 loc) · 975 Bytes
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
FROM php:8.2-apache
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
nodejs \
npm \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd pdo_mysql \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& a2enmod rewrite headers \
&& npm install -g esbuild \
&& rm -rf /var/lib/apt/lists/*
COPY docker/apache/vhost.conf /etc/apache2/sites-available/000-default.conf
COPY docker/php/conf.d/dev.ini /usr/local/etc/php/conf.d/zz-dev.ini
COPY docker/php/conf.d/xdebug.ini /usr/local/etc/php/conf.d/zz-xdebug.ini
WORKDIR /var/www/html
# Install npm dependencies + build Vite bundles
COPY package.json package-lock.json /var/www/html/
RUN npm ci
# Copy all source files for Vite build
COPY . /var/www/html/
RUN npm run vite:build || true # Continue even if build fails (for development)