buat docker

This commit is contained in:
2026-05-25 10:20:58 +08:00
parent fd3d3a4d2b
commit 05811e76ef
10 changed files with 338 additions and 0 deletions

30
docker/entrypoint.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env sh
set -e
cd /var/www/html
mkdir -p \
storage/app/public \
storage/framework/cache/data \
storage/framework/sessions \
storage/framework/testing \
storage/framework/views \
storage/logs \
bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
if [ "${RUN_LARAVEL_STORAGE_LINK:-true}" = "true" ]; then
php artisan storage:link --force >/dev/null 2>&1 || true
fi
if [ "${RUN_LARAVEL_MIGRATIONS:-false}" = "true" ]; then
php artisan migrate --force
fi
if [ "${APP_ENV:-production}" = "production" ]; then
php artisan config:cache
php artisan view:cache
fi
exec "$@"