diff --git a/bobbin/containerfiles/hydrant.Containerfile b/bobbin/containerfiles/hydrant.Containerfile index 60c942270..ebe611dd7 100644 --- a/bobbin/containerfiles/hydrant.Containerfile +++ b/bobbin/containerfiles/hydrant.Containerfile @@ -13,7 +13,7 @@ WORKDIR /src COPY --from=source /hydrant ./ # remove hydrants wild linker config RUN rm -f .cargo/config.toml -RUN cargo build --release --bin hydrant +RUN cargo build --release --bin hydrant --features jetstream RUN strip target/release/hydrant FROM debian:trixie-slim diff --git a/docker-compose.mill.yml b/docker-compose.mill.yml index bef93e461..e365bcb87 100644 --- a/docker-compose.mill.yml +++ b/docker-compose.mill.yml @@ -19,7 +19,7 @@ x-mill-executor: &mill-executor SPINDLE_SERVER_METRICS_LISTEN_ADDR: 0.0.0.0:9091 SPINDLE_SERVER_DB_PATH: /var/lib/spindle/spindle.db SPINDLE_SERVER_PLC_URL: https://plc.tngl.boltless.dev - SPINDLE_SERVER_JETSTREAM_ENDPOINT: wss://jetstream.tngl.boltless.dev/subscribe + SPINDLE_SERVER_JETSTREAM_ENDPOINT: wss://hydrant.tngl.boltless.dev/subscribe SPINDLE_SERVER_DEV: "true" SPINDLE_SERVER_DEV_EXTRA_HOSTS: knot2.tngl.boltless.dev,mirror.tngl.boltless.dev SPINDLE_SERVER_TAP_DB_PATH: /var/lib/spindle/tap.db @@ -69,8 +69,8 @@ x-mill-executor: &mill-executor depends_on: &mill-executor-deps plc: condition: service_started - jetstream: - condition: service_started + hydrant: + condition: service_healthy init-accounts: condition: service_completed_successfully ncps: diff --git a/docker-compose.yml b/docker-compose.yml index 983c68e3d..c7369fc1a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -107,23 +107,6 @@ services: depends_on: [postgres] networks: [tngl] - jetstream: - platform: linux/amd64 - image: ghcr.io/bluesky-social/jetstream:sha-d5a3b62 - restart: unless-stopped - environment: - JETSTREAM_DATA_DIR: /data - # the local pds idles, and the default ttl makes jetstream exit every ~10m. - JETSTREAM_LIVENESS_TTL: 8760h - JETSTREAM_WS_URL: wss://pds.tngl.boltless.dev/xrpc/com.atproto.sync.subscribeRepos - volumes: - - jetstream-data:/data - - ./localinfra/certs/root.crt:/etc/ssl/certs/tngl-dev-root.crt:ro - depends_on: - pds: - condition: service_healthy - networks: [tngl] - knot2: build: context: . @@ -210,7 +193,7 @@ services: SPINDLE_SERVER_METRICS_LISTEN_ADDR: 0.0.0.0:9091 SPINDLE_SERVER_DB_PATH: /var/lib/spindle/spindle.db SPINDLE_SERVER_PLC_URL: https://plc.tngl.boltless.dev - SPINDLE_SERVER_JETSTREAM_ENDPOINT: wss://jetstream.tngl.boltless.dev/subscribe + SPINDLE_SERVER_JETSTREAM_ENDPOINT: wss://hydrant.tngl.boltless.dev/subscribe SPINDLE_SERVER_DEV: "true" SPINDLE_SERVER_DEV_EXTRA_HOSTS: knot2.tngl.boltless.dev,mirror.tngl.boltless.dev SPINDLE_SERVER_TAP_DB_PATH: /var/lib/spindle/tap.db @@ -273,8 +256,8 @@ services: depends_on: plc: condition: service_started - jetstream: - condition: service_started + hydrant: + condition: service_healthy init-accounts: condition: service_completed_successfully ncps: @@ -409,7 +392,7 @@ services: TANGLED_XRPC_ENABLED: "true" TANGLED_DB_PATH: /var/lib/appview/appview.db TANGLED_PLC_URL: https://plc.tngl.boltless.dev - TANGLED_JETSTREAM_ENDPOINT: wss://jetstream.tngl.boltless.dev/subscribe + TANGLED_JETSTREAM_ENDPOINT: wss://hydrant.tngl.boltless.dev/subscribe TANGLED_REDIS_ADDR: redis:6379 TANGLED_KNOTMIRROR_URL: https://mirror.tngl.boltless.dev TANGLED_CODESEARCH_ZOEKT_URL: https://zoekt.tngl.boltless.dev @@ -436,6 +419,8 @@ services: condition: service_started pds: condition: service_healthy + hydrant: + condition: service_healthy init-accounts: condition: service_completed_successfully networks: [tngl] @@ -451,7 +436,7 @@ services: DELIBERI_LISTEN_ADDR: 0.0.0.0:6565 DELIBERI_DB_PATH: /var/lib/deliberi/deliberi.db DELIBERI_PLC_URL: https://plc.tngl.boltless.dev - DELIBERI_JETSTREAM_ENDPOINT: wss://jetstream.tngl.boltless.dev/subscribe + DELIBERI_JETSTREAM_ENDPOINT: wss://hydrant.tngl.boltless.dev/subscribe DELIBERI_BOBBIN_API_URL: http://bobbin:8090 # browser-reachable frontend; the web service replaced the appview frontend DELIBERI_BASE_URL: http://127.0.0.1:5174 @@ -474,6 +459,8 @@ services: depends_on: pds: condition: service_healthy + hydrant: + condition: service_healthy init-accounts: condition: service_completed_successfully networks: [tngl] @@ -500,11 +487,11 @@ services: environment: HYDRANT_API_BIND: 0.0.0.0:3000 HYDRANT_DATABASE_PATH: /data/hydrant.db - HYDRANT_RELAY_HOSTS: pds::wss://pds.tngl.boltless.dev + HYDRANT_RELAY_HOSTS: pds::wss://pds.tngl.boltless.dev,pds::wss://knot2.tngl.boltless.dev HYDRANT_CRAWLER_URLS: list_repos::https://pds.tngl.boltless.dev HYDRANT_PLC_URL: https://plc.tngl.boltless.dev HYDRANT_FILTER_COLLECTIONS: sh.tangled.*,org.tangled.* - HYDRANT_FILTER_SIGNALS: sh.tangled.actor.profile,sh.tangled.feed.comment,sh.tangled.feed.reaction,sh.tangled.feed.star,sh.tangled.git.refUpdate,sh.tangled.graph.follow,sh.tangled.graph.vouch,sh.tangled.knot,sh.tangled.knot.member,sh.tangled.label.definition,sh.tangled.label.op,sh.tangled.pipeline,sh.tangled.pipeline.status,sh.tangled.publicKey,sh.tangled.repo,sh.tangled.repo.artifact,sh.tangled.repo.collaborator,sh.tangled.repo.issue,sh.tangled.repo.issue.comment,sh.tangled.repo.issue.state,sh.tangled.repo.pull,sh.tangled.repo.pull.comment,sh.tangled.repo.pull.status,sh.tangled.spindle,sh.tangled.spindle.member,sh.tangled.string,org.tangled.feed.subscription + HYDRANT_FILTER_SIGNALS: sh.tangled.actor.profile,sh.tangled.feed.comment,sh.tangled.feed.reaction,sh.tangled.feed.star,sh.tangled.git.refUpdate,sh.tangled.graph.follow,sh.tangled.graph.vouch,sh.tangled.knot,sh.tangled.knot.member,sh.tangled.knot.memberAcceptance,sh.tangled.knot.memberInvite,sh.tangled.label.definition,sh.tangled.label.op,sh.tangled.pipeline,sh.tangled.pipeline.status,sh.tangled.publicKey,sh.tangled.repo,sh.tangled.repo.artifact,sh.tangled.repo.collaborator,sh.tangled.repo.collaboratorAcceptance,sh.tangled.repo.collaboratorInvite,sh.tangled.repo.issue,sh.tangled.repo.issue.comment,sh.tangled.repo.issue.state,sh.tangled.repo.pull,sh.tangled.repo.pull.comment,sh.tangled.repo.pull.status,sh.tangled.spindle,sh.tangled.spindle.member,sh.tangled.string,org.tangled.feed.subscription HYDRANT_BACKFILL_STRATEGY: sparse-filter HYDRANT_VERIFY_SIGNATURES: none RUST_LOG: info @@ -522,6 +509,8 @@ services: condition: service_started pds: condition: service_healthy + knot2: + condition: service_healthy caddy: condition: service_started init-accounts: @@ -679,7 +668,7 @@ services: - bob.pds.tngl.boltless.dev - charlie.pds.tngl.boltless.dev - david.pds.tngl.boltless.dev - - jetstream.tngl.boltless.dev + - hydrant.tngl.boltless.dev - knot2.tngl.boltless.dev - spindle.tngl.boltless.dev - tngl.boltless.dev @@ -754,7 +743,6 @@ volumes: caddy-data: postgres-data: pds-data: - jetstream-data: knot2-data: knotmirror-data: zoekt-index: diff --git a/localinfra/Caddyfile b/localinfra/Caddyfile index cfc95dd3a..95a54eed8 100644 --- a/localinfra/Caddyfile +++ b/localinfra/Caddyfile @@ -46,10 +46,10 @@ plc.tngl.boltless.dev { reverse_proxy pds:3000 } -# jetstream -jetstream.tngl.boltless.dev { +# hydrant: /subscribe is its jetstream-compatible feed (appview, spindle, deliberi) +hydrant.tngl.boltless.dev { tls internal - reverse_proxy jetstream:6008 + reverse_proxy hydrant:3000 } # knot2 answers preflight itself (knot2/crates/knot-edge/src/cors.rs), so this block diff --git a/localinfra/readme.md b/localinfra/readme.md index 6587d1c9f..1e2437e2f 100644 --- a/localinfra/readme.md +++ b/localinfra/readme.md @@ -18,7 +18,6 @@ To make that work: - [did-method-plc](https://github.com/did-method-plc/did-method-plc) () - atproto_pds () -- jetstream () - knot () - spindle () - knotmirror () @@ -26,7 +25,7 @@ To make that work: - [ncps](https://github.com/kalbasit/ncps) nix binary cache (internal, `http://ncps:8501`) - pdsls () - bobbin (, host `:8090`) -- hydrant indexer + record/identity resolver feeding bobbin (internal) +- hydrant indexer + record/identity resolver feeding bobbin; jetstream - camo () and avatar (), the workers from `camo/` and `avatar/` under wrangler. avatar resolves against the local plc, so it serves real