This commit is contained in:
parent
0b9cfe2306
commit
b62c3a0ff5
28
Dockerfile
28
Dockerfile
@ -1,10 +1,19 @@
|
|||||||
FROM php:8.1-fpm
|
FROM php:8.4-fpm
|
||||||
|
|
||||||
# Install dependencies
|
# Install system dependencies & PHP extensions
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libzip-dev \
|
||||||
|
unzip \
|
||||||
|
git \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
zip unzip curl git \
|
libicu-dev \
|
||||||
&& docker-php-ext-install pdo_pgsql
|
zip \
|
||||||
|
curl \
|
||||||
|
&& docker-php-ext-install \
|
||||||
|
intl \
|
||||||
|
zip \
|
||||||
|
pdo_pgsql \
|
||||||
|
bcmath
|
||||||
|
|
||||||
# Install Composer
|
# Install Composer
|
||||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||||
@ -14,21 +23,18 @@ WORKDIR /var/www
|
|||||||
|
|
||||||
# Copy source
|
# Copy source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Copy default env
|
|
||||||
COPY .env.example .env
|
COPY .env.example .env
|
||||||
|
|
||||||
# Install Laravel dependencies
|
# Install dependencies
|
||||||
RUN composer install --no-interaction --prefer-dist --optimize-autoloader
|
RUN composer install --no-interaction --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
# Generate Laravel app key
|
# Generate app key
|
||||||
RUN php artisan key:generate
|
RUN php artisan key:generate
|
||||||
|
|
||||||
# Set permissions for Laravel
|
# Set permissions
|
||||||
RUN chown -R www-data:www-data /var/www \
|
RUN chown -R www-data:www-data /var/www \
|
||||||
&& chmod -R 755 /var/www \
|
|
||||||
&& chmod -R 775 storage bootstrap/cache \
|
&& chmod -R 775 storage bootstrap/cache \
|
||||||
&& chown -R www-data:www-data storage bootstrap/cache
|
&& chown -R www-data:www-data storage bootstrap/cache
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
CMD ["php-fpm"]
|
CMD ["php-fpm"]
|
||||||
Loading…
x
Reference in New Issue
Block a user