trails/scripts
Ullrich Schäfer 10e0a8d41a
Local dev stack improvements
- Extend docker-compose.dev.yml with optional monitoring profile
  (Prometheus, Grafana, Loki) via --profile monitoring
- Align dev PostgreSQL with production: pg_stat_statements + init scripts
- Add scripts/seed.ts with idempotent Berlin test data (user, route, activity)
- Add pnpm db:seed and pnpm dev:reset scripts
- Simplify CI e2e job: replace manual docker run + BRouter setup with
  docker compose up --wait; add db:seed step
- Improve scripts/dev.sh: Docker check, --wait health checks, --monitoring
  flag, seed step
- Add scripts/reset-dev.sh to wipe and restart the local stack
- Add .env.development.example with documented local defaults

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 23:12:22 +02:00
..
check-dockerfiles.sh Extend Dockerfile CI check to verify COPY source paths exist 2026-04-14 12:27:18 +02:00
dev.sh Local dev stack improvements 2026-05-17 23:12:22 +02:00
download-dev-segments.sh Add local dev setup, fix BRouter Dockerfile, archive change (#12) 2026-03-22 23:11:43 +00:00
package.json Make scripts/ a pnpm workspace + add README 2026-04-19 07:56:01 +02:00
README.md Make scripts/ a pnpm workspace + add README 2026-04-19 07:56:01 +02:00
render-legal.ts Convert render-legal to TypeScript 2026-04-19 07:52:53 +02:00
reset-dev.sh Local dev stack improvements 2026-05-17 23:12:22 +02:00
seed.ts Local dev stack improvements 2026-05-17 23:12:22 +02:00
tsconfig.json Make scripts/ a pnpm workspace + add README 2026-04-19 07:56:01 +02:00

scripts

One-off CLIs for maintenance tasks that don't belong inside any of the apps or packages. Small enough to live in a single file each.

This folder is a pnpm workspace (@trails-cool/scripts) purely so TypeScript has a home to resolve @types/node from — it isn't published, bundled, or deployed. Each script is a self-contained .ts file run with node --experimental-strip-types.

Contents

Script Purpose
render-legal.ts Render a legal page (Terms / Privacy / Imprint) from its TSX source to plain markdown for docs/legal-archive/. See docs/legal-archive/README.md.
check-dockerfiles.sh Bash script run in CI to verify every workspace package is COPY'd into each app's Dockerfile.

Adding a script

  1. Drop the file in this folder (.ts preferred; shell is fine for filesystem/docker glue).
  2. For TypeScript, tsconfig.json already picks up every *.ts in this directory.
  3. Run it with node --experimental-strip-types scripts/<name>.ts <args>.
  4. Document purpose + invocation in the table above.

Why not per-package scripts?

Some things (Dockerfile audits, legal-archive rendering, DB one-offs) don't belong inside any single workspace. Keeping them here avoids cross-package dependencies and keeps the app/package roots focused on product code.