start-deps now waits until Postgres is ready
Some checks failed
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Test / docker (push) Has been cancelled
Runs E2E API Tests / build (20.x) (push) Has been cancelled
Lint & build / lint_and_build (20.x) (push) Has been cancelled
Lint & build / lint_and_build (22.x) (push) Has been cancelled
Mirror main branch to main-mirror-for-wdb / lint_and_build (push) Has been cancelled
Publish Docs / run (push) Has been cancelled
Run setup tests / test (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled

This commit is contained in:
Konstantin Wohlwend 2025-01-27 18:25:26 -08:00
parent 24533c2473
commit a73bf97885
2 changed files with 5 additions and 2 deletions

View File

@ -49,6 +49,7 @@
"otlp",
"pageleave",
"pageview",
"pg_isready",
"pkcco",
"PKCE",
"pooler",

View File

@ -14,10 +14,12 @@
"build:packages": "only-allow pnpm && turbo run build --filter=./packages/*",
"clean": "only-allow pnpm && turbo run clean && rimraf --glob **/.next && rimraf --glob **/.turbo && rimraf .turbo && rimraf --glob **/node_modules",
"codegen": "only-allow pnpm && turbo run codegen",
"deps-compose": "docker compose -f dependencies.compose.yaml",
"deps-compose": "docker compose -p stack-dependencies -f dependencies.compose.yaml",
"stop-deps": "POSTGRES_DELAY_MS=0 pnpm run deps-compose kill && POSTGRES_DELAY_MS=0 pnpm run deps-compose down -v",
"init-db": "pnpm run prisma db push && pnpm run prisma db seed",
"start-deps:no-delay": "pnpm run deps-compose up --detach --build && sleep 5 && pnpm run init-db && echo \"\\nDependencies started in the background as Docker containers. 'pnpm run stop-deps' to stop them\"n",
"wait-until-postgres-is-ready:pg_isready": "until pg_isready -h localhost -p 5432; do sleep 1; done",
"wait-until-postgres-is-ready": "command -v pg_isready >/dev/null 2>&1 && pnpm run wait-until-postgres-is-ready:pg_isready || sleep 10 # not everyone has pg_isready installed, so we fallback to sleeping",
"start-deps:no-delay": "pnpm run deps-compose up --detach --build && pnpm run wait-until-postgres-is-ready && pnpm run init-db && echo \"\\nDependencies started in the background as Docker containers. 'pnpm run stop-deps' to stop them\"n",
"start-deps": "POSTGRES_DELAY_MS=${POSTGRES_DELAY_MS:-20} pnpm run start-deps:no-delay",
"restart-deps": "pnpm run stop-deps && pnpm run start-deps",
"restart-deps:no-delay": "pnpm run stop-deps && pnpm run start-deps:no-delay",