Add compose-based dev task

This commit is contained in:
Andras Schmelczer 2026-02-07 19:02:29 +00:00
parent 091cb6f4b4
commit 7ad5b66856
2 changed files with 88 additions and 34 deletions

View file

@ -13,7 +13,21 @@ tasks:
- uv sync
- cd frontend && npm install
download:map-assets:
desc: Download font glyphs and emoji PNGs for local serving
status:
- test -d frontend/public/assets/fonts
- test -d frontend/public/assets/twemoji
cmds:
- uv run python scripts/download_map_assets.py
test:
desc: Run all tests (Python and Rust)
cmds:
- task: test:python
- task: test:server
test:python:
cmds:
- uv run -m pipeline.utils.test_fuzzy_join
- uv run pytest pipeline/utils/test_haversine.py
@ -25,37 +39,14 @@ tasks:
cmds:
- cargo test
dev:server:
desc: Run Rust backend on port 8001 (debug build, fast compile)
dir: server-rs
dev:
desc: Start all services (server, frontend, pocketbase) via Docker Compose
cmds:
- cargo run -- --data {{.WIDE_OUTPUT}} --pois {{.POIS_FILTERED_OUTPUT}} --tiles {{.TILES_OUTPUT}} --postcodes {{.POSTCODES_OUTPUT}}
- docker compose up --build
dev:server:release:
desc: Run Rust backend on port 8001 (release build)
dir: server-rs
cmds:
- cargo run --release -- --data {{.WIDE_OUTPUT}} --pois {{.POIS_FILTERED_OUTPUT}} --tiles {{.TILES_OUTPUT}} --postcodes {{.POSTCODES_OUTPUT}}
dev:og:
desc: Run OG screenshot sidecar on port 8002
dir: og-screenshot
env:
CACHE_DIR: /tmp/og-cache
NARROWIT_URL: http://localhost:3000
cmds:
- npm install
- npx playwright install --with-deps chromium
- npm run build
- npm start
dev:frontend:
desc: Run frontend dev server on port 3000 (proxies /api to :8001)
dir: frontend
deps:
- install
cmds:
- npm run dev
build:server:
desc: Build server for production