24 lines
679 B
Docker
24 lines
679 B
Docker
FROM php:8.4-fpm-alpine
|
|
|
|
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
|
|
|
RUN install-php-extensions pdo_mysql bcmath intl zip gd opcache pcntl
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
WORKDIR /var/www
|
|
|
|
COPY backend/composer.json backend/composer.lock ./
|
|
RUN composer install --no-dev --no-scripts --no-autoloader --prefer-dist --no-interaction
|
|
|
|
COPY backend .
|
|
RUN composer dump-autoload --optimize \
|
|
&& php artisan config:cache || true \
|
|
&& php artisan route:cache || true
|
|
|
|
RUN chown -R www-data:www-data storage bootstrap/cache
|
|
|
|
EXPOSE 9000
|
|
|
|
CMD ["php-fpm"]
|