another fix
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,3 +1,5 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM php:8.3-fpm-alpine AS php_build
|
FROM php:8.3-fpm-alpine AS php_build
|
||||||
|
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||||
@@ -37,12 +39,11 @@ COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|||||||
|
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
COPY composer.json composer.lock ./
|
# Copy full application so artisan is available for composer scripts when desired.
|
||||||
|
COPY . .
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction
|
composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction --no-progress --no-scripts
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
mkdir -p storage/app/public storage/logs bootstrap/cache; \
|
mkdir -p storage/app/public storage/logs bootstrap/cache; \
|
||||||
@@ -64,6 +65,3 @@ COPY --from=php_app /var/www/html/storage/app/public /var/www/html/storage/app/p
|
|||||||
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
# syntax=docker/dockerfile:1
|
|
||||||
|
|
||||||
FROM php:8.3-fpm-alpine AS php_build
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ services:
|
|||||||
command: >
|
command: >
|
||||||
sh -c "
|
sh -c "
|
||||||
chown -R www-data:www-data storage bootstrap/cache &&
|
chown -R www-data:www-data storage bootstrap/cache &&
|
||||||
|
php artisan package:discover --ansi &&
|
||||||
php artisan storage:link --ansi || true &&
|
php artisan storage:link --ansi || true &&
|
||||||
php artisan config:cache --ansi &&
|
php artisan config:cache --ansi &&
|
||||||
php artisan route:cache --ansi &&
|
php artisan route:cache --ansi &&
|
||||||
|
|||||||
Reference in New Issue
Block a user