chore: add repo scaffolding (compose, scripts, gitignore, env example)
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Start the full procurement stack (postgres + api + frontend)
|
||||
# Run this from the my-project folder (or double-click).
|
||||
#
|
||||
# powershell -ExecutionPolicy Bypass -File .\start.ps1
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
Set-Location $here
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "==============================================" -ForegroundColor Cyan
|
||||
Write-Host " Procurement stack — starting Docker..." -ForegroundColor Cyan
|
||||
Write-Host "==============================================" -ForegroundColor Cyan
|
||||
|
||||
docker compose up -d --build
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Build/start failed. Check 'docker compose logs'." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Waiting for services..." -ForegroundColor Yellow
|
||||
Start-Sleep -Seconds 5
|
||||
docker compose ps
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Frontend : http://localhost:3000" -ForegroundColor Green
|
||||
Write-Host "API docs : http://localhost:8000/docs" -ForegroundColor Green
|
||||
Write-Host "DB : localhost:5432 (procurement / postgres / postgres)" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "Stop: docker compose down | Full reset: docker compose down -v && up -d --build" -ForegroundColor DarkGray
|
||||
Reference in New Issue
Block a user