Update
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Triono Putra 2025-05-28 19:17:06 +07:00
parent fec5542019
commit 166d4987c6

View File

@ -25,16 +25,20 @@ WORKDIR /var/www
COPY . . COPY . .
COPY .env.example .env COPY .env.example .env
# Install dependencies # Set www-data user permission before running composer/install artisan
RUN composer install --no-interaction --prefer-dist --optimize-autoloader RUN chown -R www-data:www-data /var/www
# Generate app key USER www-data
RUN php artisan key:generate
# Set permissions # Install dependencies & generate app key as www-data user
RUN chown -R www-data:www-data /var/www \ RUN composer install --no-interaction --prefer-dist --optimize-autoloader \
&& chmod -R 775 storage bootstrap/cache \ && php artisan key:generate
&& chown -R www-data:www-data storage bootstrap/cache
USER root
# Set permissions again just in case
RUN chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache \
&& chmod -R 775 /var/www/storage /var/www/bootstrap/cache
EXPOSE 9000 EXPOSE 9000
CMD ["php-fpm"] CMD ["php-fpm"]