chore: consolidate local WIP (repo cleanup 20260707)
All checks were successful
CI / lint-and-test (push) Successful in 9m52s
All checks were successful
CI / lint-and-test (push) Successful in 9m52s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
28
scripts/start-local-stack.sh
Executable file
28
scripts/start-local-stack.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# Start local dev stack: Postgres (Docker), migrate, seed, dev servers.
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
if ! docker ps --format '{{.Names}}' | grep -q '^solace-postgres$'; then
|
||||
if docker ps -a --format '{{.Names}}' | grep -q '^solace-postgres$'; then
|
||||
echo "Starting existing solace-postgres container..."
|
||||
docker start solace-postgres
|
||||
else
|
||||
echo "Creating solace-postgres container..."
|
||||
docker run -d --name solace-postgres \
|
||||
-e POSTGRES_USER=solace_user \
|
||||
-e POSTGRES_PASSWORD=SolaceTreasury2024! \
|
||||
-e POSTGRES_DB=solace_treasury \
|
||||
-p 5432:5432 \
|
||||
postgres:16-alpine
|
||||
sleep 3
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Running migrations and seed..."
|
||||
(cd backend && pnpm run db:migrate && pnpm run db:seed)
|
||||
|
||||
echo "Starting dev servers (frontend :3000, backend :3001)..."
|
||||
pnpm run dev
|
||||
Reference in New Issue
Block a user