dockerfile

This commit is contained in:
浪子
2026-03-19 19:39:14 +08:00
parent 04eccc850d
commit 62cffc6f5f
13 changed files with 578 additions and 51 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env sh
set -eu
mkdir -p storage/framework/cache/data storage/framework/sessions storage/framework/views bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
if [ "${RUN_MIGRATIONS:-0}" = "1" ]; then
php artisan migrate --force
fi
if [ "${RUN_ADMIN_SEEDER:-0}" = "1" ]; then
php artisan db:seed --class="Database\\Seeders\\AdminUserSeeder" --force
fi
if [ "${RUN_OPTIMIZE:-0}" = "1" ]; then
php artisan optimize
fi
exec "$@"