Compare commits

..

2 Commits

Author SHA1 Message Date
f6e6fc72b1 fix(docker): add vendor directory check before skipping composer install
Prevents false positives from stale hash files when vendor/autoload.php
is missing. This fixes "Failed to open stream" errors after volume cleanup
or fresh clone scenarios where the hash file exists but vendor directory
doesn't.
2025-12-19 19:27:29 +03:00
16e98b5663 feat: add db recreation target and update Laravel setup docs 2025-12-14 23:17:23 +03:00
3 changed files with 3 additions and 3 deletions

View File

@@ -58,4 +58,4 @@ docs:
db:
@echo "Recreate DB..."
docker compose exec --user www php-fpm bash -c "php artisan migrate:fresh && php artisan db:seed"
docker compose exec --user www php-fpm bash -c "php artisan migrate:fresh --seed"

View File

@@ -1,6 +1,6 @@
# Laravel Docker Setup
- NGINX, MySQL, phpMyAdmin
- PHP-FPM, NGINX, MySQL, phpMyAdmin (in `compose.yaml`)
## Create a project:

View File

@@ -11,7 +11,7 @@ fi
gosu www mkdir -p .hashes
if [ ! -f .hashes/.composer-hash ] || ! sha1sum -c .hashes/.composer-hash; then
if [ ! -f "vendor/autoload.php" ] || [ ! -f .hashes/.composer-hash ] || ! sha1sum -c .hashes/.composer-hash; then
echo ">> composer.json or composer.lock changed, installing dependencies..."
gosu www composer install --optimize-autoloader --no-interaction
gosu www sha1sum composer.json composer.lock > .hashes/.composer-hash