33 lines
971 B
PowerShell
33 lines
971 B
PowerShell
# setup.ps1
|
|
Write-Output "=== Iniciando configuración de Kinetix Intranet Monorepo ==="
|
|
|
|
# 1. Copiar archivo de entorno si no existe
|
|
if (!(Test-Path ".env")) {
|
|
Write-Output "[SETUP] Creando .env desde plantilla..."
|
|
Copy-Item ".env.local.template" ".env"
|
|
} else {
|
|
Write-Output "[SETUP] .env ya existe."
|
|
}
|
|
|
|
# Copiar al backend y frontend si lo requieren
|
|
if (!(Test-Path "backend/.env")) {
|
|
if (Test-Path "backend") {
|
|
Copy-Item ".env.local.template" "backend/.env"
|
|
}
|
|
}
|
|
|
|
# 2. Crear carpetas de logs
|
|
if (!(Test-Path "logs")) {
|
|
$null = New-Item -ItemType Directory -Path "logs" -Force
|
|
}
|
|
if (!(Test-Path "logs/app.log")) {
|
|
$null = New-Item -ItemType File -Path "logs/app.log" -Force
|
|
}
|
|
|
|
# 3. Instalar dependencias en raíz
|
|
Write-Output "[SETUP] Instalando dependencias de monorepo..."
|
|
npm install --no-audit
|
|
|
|
Write-Output "=== Configuración básica completa! ==="
|
|
Write-Output "Ejecuta 'docker-compose up -d' para levantar la Base de Datos."
|