Add local development environment with switchable backend
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
Set up local dev workflow: SSH tunnel to dev DB, Next.js API proxy via rewrites, Docker or native backend on port 5000. Update and restructure project documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
4
scripts/local-backend-docker.ps1
Normal file
4
scripts/local-backend-docker.ps1
Normal file
@@ -0,0 +1,4 @@
|
||||
Write-Host "Starting Docker backend on http://localhost:5000" -ForegroundColor Cyan
|
||||
Write-Host "Requires: SSH tunnel running (scripts/local-tunnel.ps1)"
|
||||
Write-Host ""
|
||||
docker compose -f "$PSScriptRoot\..\deploy\docker-compose.local.yml" up --build
|
||||
6
scripts/local-backend-dotnet.ps1
Normal file
6
scripts/local-backend-dotnet.ps1
Normal file
@@ -0,0 +1,6 @@
|
||||
Write-Host "Starting backend (dotnet run) on http://localhost:5000" -ForegroundColor Cyan
|
||||
Write-Host "Requires: SSH tunnel running (scripts/local-tunnel.ps1)"
|
||||
Write-Host ""
|
||||
Push-Location "$PSScriptRoot\..\backend"
|
||||
dotnet run --project src/GBSite.Api
|
||||
Pop-Location
|
||||
6
scripts/local-frontend.ps1
Normal file
6
scripts/local-frontend.ps1
Normal file
@@ -0,0 +1,6 @@
|
||||
Write-Host "Starting frontend on http://localhost:3000" -ForegroundColor Cyan
|
||||
Write-Host "API proxy -> http://localhost:5000"
|
||||
Write-Host ""
|
||||
Push-Location "$PSScriptRoot\..\frontend"
|
||||
npm run dev
|
||||
Pop-Location
|
||||
4
scripts/local-tunnel.ps1
Normal file
4
scripts/local-tunnel.ps1
Normal file
@@ -0,0 +1,4 @@
|
||||
Write-Host "SSH Tunnel: localhost:5433 -> server:5432 (dev_db)" -ForegroundColor Cyan
|
||||
Write-Host "Press Ctrl+C to stop"
|
||||
Write-Host ""
|
||||
ssh -N -L 5433:127.0.0.1:5432 -o ServerAliveInterval=60 deploy@31.131.18.254
|
||||
Reference in New Issue
Block a user