- remove the separate casdoor-postgres container; casdoor uses the main postgres (db casdoor, created by sql/02-casdoor-db.sql on fresh volumes); data migrated via pg_dump/pg_restore (backups kept outside the repo) - Traefik v3.6 as the public edge (ports 80/443): docker provider pinned to the dedicated traefik_network (fixed-name network), host rules for app/api/auth/s3/storage (env-overridable, localhost defaults), frontend nginx demoted to internal SPA server; docker-compose.prod.yml adds real domains + Let's Encrypt + HTTP→HTTPS redirect (redirect middleware in infra/traefik-dynamic.yml) - v3.6 required (Traefik <=3.3 fails against Docker Engine 29.x); socket mounted rw (Docker Desktop rejects :ro) - start.ps1: app URL now http://localhost, casdoor + db notes
34 lines
1.3 KiB
PowerShell
34 lines
1.3 KiB
PowerShell
# 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 (via Traefik; old :3000 is gone)" -ForegroundColor Green
|
|
Write-Host "API docs : http://localhost:8000/docs" -ForegroundColor Green
|
|
Write-Host "Casdoor : http://localhost:8080 (admin / 123)" -ForegroundColor Green
|
|
Write-Host "DB : localhost:5433 (procurement / postgres / postgres; casdoor DB inside the same instance)" -ForegroundColor Green
|
|
Write-Host ""
|
|
Write-Host "Stop: docker compose down | Full reset: docker compose down -v && up -d --build" -ForegroundColor DarkGray
|