17 lines
815 B
PowerShell
17 lines
815 B
PowerShell
param([string]$Php = 'C:\php83\php.exe')
|
|
$ErrorActionPreference = 'Stop'
|
|
if (-not (Test-Path -LiteralPath $Php)) { throw "PHP tidak ditemukan: $Php" }
|
|
if (-not (Test-Path -LiteralPath '.env')) { Copy-Item -LiteralPath '.env.example' -Destination '.env' }
|
|
Write-Host 'Atur DB_HOST, DB_DATABASE, DB_USERNAME, DB_PASSWORD dan DEPLOYMENT_MODE=self_hosted pada .env.'
|
|
$confirmation = Read-Host 'Ketik LANJUT setelah .env selesai diatur'
|
|
if ($confirmation -ne 'LANJUT') { throw 'Instalasi dibatalkan.' }
|
|
& composer install --no-dev --optimize-autoloader
|
|
& $Php artisan key:generate --force
|
|
& $Php artisan migrate --force
|
|
& $Php artisan db:seed --force
|
|
& $Php artisan app:install-tenant
|
|
& npm ci
|
|
& npm run build
|
|
& $Php artisan optimize
|
|
Write-Host 'Instalasi RADIQ NDM selesai. Konfigurasikan web server ke folder public.'
|