-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 757 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (22 loc) · 757 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.3-fpm
# System deps
RUN apt-get update && apt-get install -y \
git curl unzip libpq-dev libzip-dev \
&& docker-php-ext-install pdo pdo_pgsql zip \
&& rm -rf /var/lib/apt/lists/*
# Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Node (for Vite build)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get update && apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /var/www/html
# Copy app
COPY . .
# Install dependencies
RUN composer install --no-interaction --prefer-dist
RUN npm ci && npm run build
# Permissions (runtime will also set)
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache || true
EXPOSE 9000
CMD ["php-fpm"]