Files
ChatbotAI/docker/entrypoint.sh
2026-05-25 10:20:58 +08:00

31 lines
641 B
Bash

#!/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 "$@"