File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ services :
2+ db :
3+ image : postgres:17
4+ container_name : thevoid-db-dev
5+ restart : unless-stopped
6+ environment :
7+ POSTGRES_USER : postgres
8+ POSTGRES_PASSWORD : ${POSTGRES_PASSWORD}
9+ POSTGRES_DB : ${POSTGRES_DB}
10+ volumes :
11+ - pgdata_dev:/var/lib/postgresql/data
12+ ports :
13+ - " 5432:5432"
14+ healthcheck :
15+ test : ["CMD-SHELL", "pg_isready -U postgres"]
16+ interval : 10s
17+ timeout : 5s
18+ retries : 5
19+ start_period : 10s
20+
21+ volumes :
22+ pgdata_dev :
Original file line number Diff line number Diff line change 33 "version" : " 0.10.5" ,
44 "type" : " module" ,
55 "scripts" : {
6- "dev" : " vite dev" ,
6+ "dev" : " ./startup- dev.sh " ,
77 "build" : " vite build" ,
88 "preview" : " vite preview" ,
99 "check" : " svelte-kit sync && svelte-check --tsconfig ./tsconfig.json" ,
Original file line number Diff line number Diff line change 1- # docker compose up db -d &&
1+ #! /bin/bash
22
3- # bunx prisma migrate dev &&
4- # bunx prisma generate &&
3+ set -e # this makes sure that if any command fails, the script exits
54
6- GIT_COMMIT=$( git rev-parse --short HEAD) bun dev
5+ echo " Starting dev environment..."
6+
7+ # Load environment variables from .env.local, or defaults
8+ if [ -f .env.local ]; then
9+ echo " Loading .env.local..."
10+ export $( grep -v ' ^#' .env.local | xargs)
11+ elif [ -f .env ]; then
12+ echo " Loading .env..."
13+ export $( grep -v ' ^#' .env | xargs)
14+ else
15+ echo " .env.local not found. Using defaults..."
16+ fi
17+
18+ # Start database in background
19+ echo " Starting postgres..."
20+ docker compose -f compose.dev.yml up -d db
21+
22+ # Run prisma migrations
23+ echo " Running Prisma migrations..."
24+ bunx prisma migrate dev
25+
26+ # Start the dev server with HMR
27+ echo " Starting dev server..."
28+ GIT_COMMIT=$( git rev-parse --short HEAD) bunx vite dev
You can’t perform that action at this time.
0 commit comments