Skip to content

Commit 234ab1b

Browse files
committed
поправил деплой
1 parent 00e8725 commit 234ab1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cac
4545

4646
EXPOSE 9000
4747

48-
# Fix permissions, create storage directories and link, and run artisan commands as www-data, then start php-fpm as root
48+
# Fix permissions, create storage directories and link, run migrations, cache configs, and start php-fpm as root
4949
CMD mkdir -p /var/www/html/storage/logs /var/www/html/storage/framework/cache /var/www/html/storage/framework/sessions /var/www/html/storage/framework/views /var/www/html/storage/app/public/images/categories /var/www/html/storage/app/public/images/products 2>/dev/null || true && \
5050
chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache 2>/dev/null || true && \
5151
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache 2>/dev/null || true && \
52-
su www-data -s /bin/sh -c "php artisan storage:link 2>/dev/null || true && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan event:cache && php artisan migrate" && \
52+
su www-data -s /bin/sh -c "php artisan storage:link 2>/dev/null || true && php artisan migrate --force --no-interaction && php artisan config:cache && php artisan route:cache && php artisan view:cache && php artisan event:cache" && \
5353
exec php-fpm

0 commit comments

Comments
 (0)