feat(deploy): Docker stack + OpenMeter bootstrap + Railway CI (MVP 0)#22
Draft
eliteprox wants to merge 3 commits into
Draft
feat(deploy): Docker stack + OpenMeter bootstrap + Railway CI (MVP 0)#22eliteprox wants to merge 3 commits into
eliteprox wants to merge 3 commits into
Conversation
…way CI Reorders the clearinghouse MVP: the deploy/ stack lands first, before the /authorize webhook (issue #2) and adapter work. All three Railway services (kafka, openmeter-collector, remote-signer) are Dockerfile-based with per-service railway.json manifests and a single deploy-railway workflow. No Apache DMZ — go-livepeer runs directly in the remote-signer container. The CLI/admin port (-cliAddr) is bound to 127.0.0.1 inside the container and is never published, to docker-compose or Railway. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Jun 15, 2026
Adds a new billing model with a `billable_usd_micros` meter and `billable_spend` feature, along with a default pay-per-use plan in `config/pricing.json`. Introduces the `provision:customer` script for creating Auth0 customers and subscriptions. Updates the OpenMeter/Konnect bootstrap process to include the new billing features and ensures compatibility with existing meters. Enhances documentation to reflect these changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reorders the clearinghouse MVP:
deploy/ships first, ahead of the/authorizewebhook and adapter work from issue #2. This PR adds everything needed to run the three-container stack locally and push it to Railway via CI.Stacked on #21 — until PR #21 merges, this diff includes #21's scaffolding. The new work (
deploy/,scripts/,config/,@openmeter/sdk) is independent.What's in this PR
deploy/— Docker stack (no Apache DMZ, CLI port not exposed)kafkaredpanda:v24.2.4KAFKA_ADVERTISED_ADDRenv selects local vs. Railway private networkingremote-signerlivepeer/go-livepeer:latest-cliAddr=127.0.0.1:4935(loopback only);EXPOSE 8081onlyopenmeter-collectorghcr.io/openmeterio/benthos-collector:latestcollector.yamlfrom pymthouse PR #133 reference;http_client+OPENMETER_INGEST_URLLocal usage:
pnpm stack:up / stack:down / stack:logs(requiresdeploy/.envfromdeploy/.env.example).OpenMeter/Konnect bootstrap scripts
config/meters.json+scripts/lib/{meters,openmeter,konnect-metering}.ts— ported from auth0-livepeer PR Scaffold clearinghouse example repo consuming builder-sdk v0.4.1 #1pnpm openmeter:bootstrap— provisionsnetwork_fee_usd_micros/signed_ticket_countmeters andnetwork_spendfeature; Konnect-first, self-hosted OpenMeter fallback@openmeter/sdk@^1.0.0-beta.228(used by the legacy self-hosted path)Railway CI
deploy/*/railway.json— per-service manifests (builder=DOCKERFILE,watchPatterns,ON_FAILURErestart)scripts/lib/railway-auth.sh—railway_export_auth/railway_pe_flags/railway_retry;RAILWAY_PROJECT_IDis a required env/secret (no hardcoded default)scripts/railway-deploy-from-manifest.sh— generic manifest-swap +railway up -s <service>scripts/railway-deploy-stack.sh— orchestrates kafka → openmeter-collector → remote-signerscripts/railway-apply-stack-env.sh— sets per-service vars with Railway private networking (kafka.railway.internal:9092).github/workflows/deploy-railway.yml— off by default (RAILWAY_AUTO_DEPLOYrepo var);workflow_dispatchwithenvironmentinputTest plan
pnpm lint— zero warningspnpm typecheck— no errorspnpm test— 2 tests passpnpm build— clean emitcp deploy/.env.example deploy/.env+ fill values →pnpm stack:up→ confirm kafka healthy, signer on 8081, collector running; confirm port 4935 not publishedOPENMETER_URL=... OPENMETER_API_KEY=kpat_... pnpm openmeter:bootstrap→ meters + feature created in Konnect dashboardRAILWAY_AUTO_DEPLOY=true+ required secrets → push triggers Railway deployCloses / supersedes
Implements the "MVP 0" scope described in github.com/livepeer/clearinghouse/milestones:
🤖 Generated with Claude Code