browser-sec-lab/docker/php/entrypoint.sh
2026-04-14 16:14:19 +03:30

27 lines
889 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# توقف در صورت بروز خطا
set -e
echo "[+] Starting Initialization Process..."
# ۱. نصب وابستگی‌های PHP با نادیده گرفتن پکیج‌های Dev و ناهماهنگی فایل لاک
echo "[+] Installing PHP dependencies via Composer..."
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
# ۲. پاکسازی node_modules قدیمی (برای جلوگیری از تداخل لینوکس/ویندوز)
echo "[+] Cleaning old node_modules..."
rm -rf node_modules package-lock.json
# ۳. نصب پکیج‌های NPM از نکسوس
echo "[+] Installing NPM dependencies..."
npm install
# ۴. بیلد کردن فرانت‌اِند (Tailwind/Vite)
echo "[+] Building frontend assets..."
npm run build
# ۵. اجرای سرویس اصلی
echo "[+] Starting PHP-FPM for Browser-Sec-Lab..."
exec php-fpm