/
githubmirror
/
tldraw
Обзор
Документация
Войти
/
githubmirror
/
tldraw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
apps/dotcom/process-compose.yaml
116 строк
4 KB
Mitja Bezenšek
feat(dotcom): add transactional outbox for file side effects (#9893)
07 авг 2026, 10:26
Не верифицирован
07 авг 2026, 10:26
2e1dbdc
Код
Авторство
О чём код?
# Dotcom dev stack, brought up by `yarn dev-app`. Usage notes in apps/dotcom/README.md. version: '0.5' # Readiness = TCP connect (a portable node one-liner; wrangler's `/` 404s, so http_get won't do), # except sync-worker, which probes a real route (see its probe comment). processes: # postgres + pgbouncer — the two containers (wal2json / logical replication) postgres: command: docker compose -f apps/dotcom/zero-cache/docker/docker-compose.yml up shutdown: command: docker compose -f apps/dotcom/zero-cache/docker/docker-compose.yml down readiness_probe: exec: command: node -e "require('net').connect(6543,'127.0.0.1').on('connect',function(){this.end();process.exit(0)}).on('error',()=>process.exit(1))" initial_delay_seconds: 2 period_seconds: 2 # ~180s budget: the first run pulls the postgres image, which can take minutes. failure_threshold: 90 # migrations — one-shot; gates zero-cache migrate: command: yarn workspace @tldraw/zero-cache migrate depends_on: postgres: condition: process_healthy availability: restart: 'no' # zero-cache — replicates from postgres. Runs directly: nothing reads .schema.js, so there's no # schema rebuild/restart watch. zero-cache: command: yarn workspace @tldraw/zero-cache exec zero-cache environment: - NODE_ENV=development - ZERO_UPSTREAM_DB=postgresql://user:password@127.0.0.1:6543/postgres - ZERO_CVR_DB=postgresql://user:password@127.0.0.1:6543/postgres - ZERO_CHANGE_DB=postgresql://user:password@127.0.0.1:6543/postgres - ZERO_REPLICA_FILE=/tmp/tldraw-dotcom-zero-dev.db - ZERO_NUM_SYNC_WORKERS=1 - ZERO_CVR_MAX_CONNS=6 - ZERO_UPSTREAM_MAX_CONNS=6 - ZERO_APP_PUBLICATIONS=zero_data - ZERO_MUTATE_URL=http://localhost:8787/app/zero/mutate - ZERO_QUERY_URL=http://localhost:8787/app/zero/query - ZERO_ENABLE_CRUD_MUTATIONS=false - ZERO_LOG_LEVEL=info - ZERO_ENABLE_STARTUP_MESSAGE=0 - DO_NOT_TRACK=1 depends_on: migrate: condition: process_completed_successfully readiness_probe: exec: command: node -e "require('net').connect(4848,'127.0.0.1').on('connect',function(){this.end();process.exit(0)}).on('error',()=>process.exit(1))" initial_delay_seconds: 3 period_seconds: 2 failure_threshold: 90 # workers — wrangler dev / workerd on the host sync-worker: command: yarn workspace @tldraw/dotcom-worker dev depends_on: zero-cache: condition: process_healthy # Probing /app/outbox-status (not a bare TCP connect) also wakes the outbox processor DO — # local workerd doesn't fire persisted alarms for an uninstantiated DO, so without this a # restarted stack wouldn't drain trigger-only writes until the first mutation. readiness_probe: http_get: host: 127.0.0.1 port: 8787 path: /app/outbox-status initial_delay_seconds: 3 period_seconds: 2 failure_threshold: 60 asset-upload-worker: command: yarn workspace dotcom-asset-upload dev # image-resize + usercontent bind sync-worker by name, so it must come up first image-resize-worker: command: yarn workspace images.tldraw.com dev depends_on: sync-worker: condition: process_healthy tldrawusercontent-worker: command: yarn workspace dotcom-tldrawusercontent dev depends_on: sync-worker: condition: process_healthy # css — tldraw.css / commenting.css are generated, not checked in. Each package's `predev` writes # them once, then its `dev` watches the source css and re-copies. The client @imports both, so it # waits for the files to exist. css: command: LAZYREPO_PRETTY_OUTPUT=0 yarn lazy run dev --filter='packages/tldraw' --filter='packages/commenting' readiness_probe: exec: command: node -e "require('fs').accessSync('packages/tldraw/tldraw.css');require('fs').accessSync('packages/commenting/commenting.css')" initial_delay_seconds: 2 period_seconds: 2 failure_threshold: 60 # client — vite dev server client: command: yarn workspace dotcom dev depends_on: sync-worker: condition: process_healthy zero-cache: condition: process_healthy css: condition: process_healthy