@@ -0,0 +1,16 @@
|
||||
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.'
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
PHP_BIN="${PHP_BIN:-php}"
|
||||
[ -f .env ] || cp .env.example .env
|
||||
echo 'Atur koneksi database dan DEPLOYMENT_MODE=self_hosted pada .env.'
|
||||
read -r -p 'Ketik LANJUT setelah .env selesai diatur: ' confirmation
|
||||
[ "$confirmation" = 'LANJUT' ] || { echo 'Instalasi dibatalkan.'; exit 1; }
|
||||
composer install --no-dev --optimize-autoloader
|
||||
"$PHP_BIN" artisan key:generate --force
|
||||
"$PHP_BIN" artisan migrate --force
|
||||
"$PHP_BIN" artisan db:seed --force
|
||||
"$PHP_BIN" artisan app:install-tenant
|
||||
npm ci
|
||||
npm run build
|
||||
"$PHP_BIN" artisan optimize
|
||||
echo 'Instalasi RADIQ NDM selesai. Arahkan document root web server ke folder public.'
|
||||
Reference in New Issue
Block a user