refactor: consolidate CI and local dev orchestration (#108)

## Summary
- Extract shared bootstrap functions into `scripts/bootstrap-common.sh` (eliminates ~120 lines of duplicated forge/cast commands from e2e.yml)
- Create reusable `scripts/wait-for-service.sh` for health checks (replaces 60-line inline wait-for-stack)
- Merge dev and CI entrypoints into unified scripts branching on `CI` env var (delete `docker/ci-entrypoints/`)
- Replace 4 per-service CI Dockerfiles with parameterized `docker/Dockerfile.service-ci`
- Add `sync-tax-rates.mjs` to CI image builder stage
- Fix: CI now grants txnBot recenter access (was missing)
- Fix: txnBot funding parameterized (CI=10eth, local=1eth)
- Delete 5 obsolete migration docs and 4 DinD integration files

Net: -1540 lines removed

Closes #107

## Test plan
- [ ] E2E pipeline passes (bootstrap sources shared script, services use old images with commands override)
- [ ] build-ci-images pipeline builds all 4 services with unified Dockerfile
- [ ] Local dev stack boots via `./scripts/dev.sh start`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/108
This commit is contained in:
johba 2026-02-03 12:07:28 +01:00
parent 4277f19b68
commit e5e1308e72
45 changed files with 882 additions and 2627 deletions

View file

@ -34,7 +34,8 @@ fi
container_name() {
local service="$1"
echo "${PROJECT_NAME}_${service}_1"
# docker compose v2 uses hyphens; v1 used underscores
echo "${PROJECT_NAME}-${service}-1"
}
# Check Docker disk usage and warn if approaching limits
@ -201,6 +202,13 @@ start_stack() {
wait_for_healthy "$(container_name caddy)" "$CADDY_TIMEOUT" || exit 1
# Smoke test: verify end-to-end connectivity through Caddy
echo " Running smoke test..."
./scripts/wait-for-service.sh http://localhost:8081/app/ 30 "caddy-proxy" || {
echo " [!!] Smoke test failed — Caddy proxy not serving /app/"
exit 1
}
if [[ -z "${SKIP_WATCH:-}" ]]; then
echo "Watching for kraiken-lib changes..."
./scripts/watch-kraiken-lib.sh &