Skip to content

ops: support local viewer hosting through a restricted ngrok tunnel #303

Description

@ivanmkc

Goal

Use termchart's local viewer as the supported deployment and expose it to the remote agent machine through an ngrok Agent Endpoint. Cloud Run is not required for this workflow.

Operating model

  1. Start the viewer on the host with a fixed port, non-default PUSH_TOKEN, and workspace id.
  2. Start ngrok on the host, forwarding HTTPS to the local viewer.
  3. Restrict the ngrok endpoint to the remote machine's stable egress IP where possible; otherwise use an ngrok access policy the remote client can satisfy.
  4. Set TERMCHART_VIEWER_URL=https://<ngrok-host>/w/<wsid> and TERMCHART_VIEWER_TOKEN=<PUSH_TOKEN> on the remote machine.
  5. Keep ngrok policy and all credentials outside the repository.

Termchart's bearer token protects mutation endpoints, but viewer/read endpoints are open to anyone who can reach the workspace URL. The ngrok boundary must therefore provide access control when the board contents are not public.

Repository cleanup

  • Change .github/workflows/deploy.yml from push-triggered Cloud Run deployment to manual-only, or remove it if Cloud Run is permanently retired.
  • Add a local-host + ngrok operating section to packages/viewer/README.md.
  • Update release/hosting language that incorrectly treats Cloud Run as required.

Acceptance criteria

  • Normal pushes no longer produce a known-failing Cloud Run workflow.
  • Local viewer starts with a non-default token.
  • Remote machine can run list, push, focus, and status through the ngrok URL.
  • Local viewer receives live SSE updates from the remote push.
  • Stopping ngrok makes the public endpoint unreachable while localhost remains available.
  • No endpoint names, IPs, ngrok credentials, or termchart tokens are committed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:releaseRelease metadata and publishingarea:viewerWeb viewerpriority:P0Immediate / blockingtype:opsOperations or infrastructure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions