mirror of
https://codeberg.org/likwid/likwid.git
synced 2026-02-09 21:13:09 +00:00
31 lines
1.4 KiB
PowerShell
31 lines
1.4 KiB
PowerShell
# Prepare Production Build Script (Windows PowerShell)
|
|
# Creates a production-ready backend without demo seed data
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
Write-Host "=== Preparing Production Build ===" -ForegroundColor Cyan
|
|
|
|
$projectRoot = "$PSScriptRoot\.."
|
|
$backendDir = "$projectRoot\backend"
|
|
$migrationsDir = "$backendDir\migrations_demo"
|
|
$demoMigration = "$migrationsDir\20260127150000_demo_seed_data.sql"
|
|
|
|
# Check if demo migration exists
|
|
if (Test-Path $demoMigration) {
|
|
Write-Host "`nDemo seed migration found. For production:" -ForegroundColor Yellow
|
|
Write-Host " 1. This file should be EXCLUDED from production deployments"
|
|
Write-Host " 2. It contains test users and sample data"
|
|
Write-Host ""
|
|
|
|
Write-Host "No action required:" -ForegroundColor Green
|
|
Write-Host " - The backend only runs migrations_demo when DEMO_MODE=true"
|
|
Write-Host " - The production container build excludes demo seed data via INCLUDE_DEMO_SEED=false"
|
|
Write-Host " - Keep this file in your working tree for demo/dev" -ForegroundColor Green
|
|
} else {
|
|
Write-Host "Demo migration not found - already production ready" -ForegroundColor Green
|
|
}
|
|
|
|
Write-Host "`n=== Production Preparation Complete ===" -ForegroundColor Green
|
|
Write-Host "`nNext steps:"
|
|
Write-Host " 1. Configure compose/.env.production"
|
|
Write-Host " 2. Run: podman-compose -f compose/production.yml up -d"
|