Initial commit
This commit is contained in:
21
docker/app/entrypoint.sh
Normal file
21
docker/app/entrypoint.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# docker/app/entrypoint.sh
|
||||
set -euo pipefail
|
||||
|
||||
# Pokud nechceš migrovat/cachovat při startu, tyto bloky odstraň.
|
||||
# V produkci často dává smysl mít to řízené deploy procesem.
|
||||
|
||||
php artisan config:clear >/dev/null 2>&1 || true
|
||||
php artisan route:clear >/dev/null 2>&1 || true
|
||||
php artisan view:clear >/dev/null 2>&1 || true
|
||||
|
||||
# Cache pro production (vyžaduje korektní .env)
|
||||
php artisan config:cache || true
|
||||
php artisan route:cache || true
|
||||
php artisan view:cache || true
|
||||
php artisan event:cache || true
|
||||
|
||||
# Migrace (pokud chceš automaticky; jinak vypnout)
|
||||
php artisan migrate --force || true
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user