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 .env.example .env
# Install dependencies
RUN composer install --no-interaction --prefer-dist --optimize-autoloader
# Set www-data user permission before running composer/install artisan
RUN chown -R www-data:www-data /var/www
# Generate app key
RUN php artisan key:generate
USER www-data
# Set permissions
RUN chown -R www-data:www-data /var/www \
&& chmod -R 775 storage bootstrap/cache \
&& chown -R www-data:www-data storage bootstrap/cache
# Install dependencies & generate app key as www-data user
RUN composer install --no-interaction --prefer-dist --optimize-autoloader \
&& php artisan key:generate
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
CMD ["php-fpm"]
CMD ["php-fpm"]