Something went wrong. Try again.
Read-only ActivityPub → atproto bridge for the threadiverse using Coves lexicons
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180# Tidepool local development stack (Coves-style profiles).## Usage:# make dev-up # start the dev database (port 5442)# make test # starts postgres-test (port 5443) and runs the suite# make dev-down # stop everything## Ports 5442/5443 are chosen to stay clear of the Coves stack# (5434 test, 5435 dev, 5436 plc).
services: # Development database (port 5442) postgres: image: postgres:16 container_name: tidepool-dev-postgres ports: - "5442:5432" environment: POSTGRES_DB: ${POSTGRES_DB:-tidepool_dev} POSTGRES_USER: ${POSTGRES_USER:-tidepool} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-tidepool} volumes: - postgres-data:/var/lib/postgresql/data networks: - tidepool-dev healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-tidepool} -d ${POSTGRES_DB:-tidepool_dev}"] interval: 5s timeout: 5s retries: 5
# Test database (port 5443) — used by `make test` postgres-test: image: postgres:16 container_name: tidepool-test-postgres # Durability is off and the data lives in memory: test data is disposable. # Recreating the container discards every database in it, including each # worktree's branch database; the next test run recreates and migrates it. command: ["-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] ports: - "${POSTGRES_TEST_PORT:-5443}:5432" environment: POSTGRES_DB: ${POSTGRES_TEST_DB:-tidepool_test} POSTGRES_USER: ${POSTGRES_TEST_USER:-tidepool_test} POSTGRES_PASSWORD: ${POSTGRES_TEST_PASSWORD:-tidepool_test} # Capped so a database-leak regression cannot grow this filesystem to the # uncapped default of half of host RAM. tmpfs: - /var/lib/postgresql/data:size=3g networks: - tidepool-dev healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_TEST_USER:-tidepool_test} -d ${POSTGRES_TEST_DB:-tidepool_test}"] interval: 2s timeout: 5s retries: 15 profiles: - test
# PLC directory postgres — backing store for the local did:plc directory. # Port 5444 stays clear of both the Tidepool (5442/5443) and Coves # (5434/5435/5436) stacks. postgres-plc: image: postgres:16 container_name: tidepool-dev-postgres-plc ports: - "${POSTGRES_PLC_PORT:-5444}:5432" environment: POSTGRES_DB: plc_dev POSTGRES_USER: plc_user POSTGRES_PASSWORD: plc_password volumes: - postgres-plc-data:/var/lib/postgresql/data networks: - tidepool-dev healthcheck: test: ["CMD-SHELL", "pg_isready -U plc_user -d plc_dev"] interval: 5s timeout: 5s retries: 5 profiles: - plc
# Local PLC directory (the real did-method-plc server), modeled on the # Coves dev stack. Minting tests run against this — NEVER against the # public https://plc.directory. # # NOTE: this maps host port 3002, the same port the Coves dev PLC # (coves-dev-plc) uses — run one or the other. The identity tests only # need *something* answering at TIDEPOOL_TEST_PLC_URL (default # http://localhost:3002), so an already-running Coves PLC works as-is. # # Usage: docker compose -f docker-compose.dev.yml --profile plc up -d # First start clones and builds did-method-plc (several minutes); the # volume caches it for later runs. plc-directory: image: node:22-alpine container_name: tidepool-dev-plc ports: - "${PLC_PORT:-3002}:3000" working_dir: /app command: > sh -c " if [ ! -d '/app/.git' ]; then echo 'First run: Installing PLC directory...' && apk add --no-cache git python3 make g++ yarn && git clone https://github.com/did-method-plc/did-method-plc.git . && yarn install --frozen-lockfile && yarn build && echo 'PLC directory installed successfully!' fi && cd packages/server && yarn start " environment: DATABASE_URL: postgresql://plc_user:plc_password@postgres-plc:5432/plc_dev?sslmode=disable DEBUG_MODE: "1" LOG_ENABLED: "true" LOG_LEVEL: debug LOG_DESTINATION: "1" NODE_ENV: development PORT: 3000 volumes: - plc-app-data:/app networks: - tidepool-dev depends_on: postgres-plc: condition: service_healthy healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/_health"] interval: 10s timeout: 5s retries: 10 start_period: 300s profiles: - plc
# Jetstream pointed at the bridge's own firehose — the task-04 integration # proof (`make jetstream-up`; runbook in README "Verifying with Jetstream"). # The bridge runs on the HOST (make run), so Jetstream reaches it via # host.docker.internal (mapped for Linux too via extra_hosts). jetstream: image: ghcr.io/bluesky-social/jetstream:sha-306e463693365e21a5ffd3ec051a5a7920000214 container_name: tidepool-dev-jetstream ports: - "6018:6018" # WebSocket endpoint (Coves dev uses 6008; offset avoids clashing) - "6019:6019" # metrics environment: JETSTREAM_WS_URL: ws://host.docker.internal:8091/xrpc/com.atproto.sync.subscribeRepos JETSTREAM_LISTEN_ADDR: ":6018" JETSTREAM_METRICS_LISTEN_ADDR: ":6019" JETSTREAM_DATA_DIR: /data JETSTREAM_EVENT_TTL: 24h # Dev bridges can be quiet for long stretches; don't self-restart. JETSTREAM_LIVENESS_TTL: 24h extra_hosts: - "host.docker.internal:host-gateway" volumes: - jetstream-data:/data networks: - tidepool-dev profiles: - jetstream
networks: tidepool-dev: driver: bridge name: tidepool-dev-network
volumes: postgres-data: name: tidepool-dev-postgres-data postgres-plc-data: name: tidepool-dev-postgres-plc-data plc-app-data: name: tidepool-dev-plc-app-data jetstream-data: name: tidepool-dev-jetstream-data