Skip to content

feat: add template for Tera Router AI gateway - #1319

Merged
Siumauricio merged 2 commits into
Dokploy:canaryfrom
masb0ymas:feat/terarouter
Nov 13, 2026
Merged

Siumauricio merged 2 commits into
Dokploy:canaryfrom
masb0ymas:feat/terarouter

Conversation

@masb0ymas

Copy link
Copy Markdown
Contributor

What is this PR about?

New PR of Tera Router — a self-hosted AI router that puts a single OpenAI/Anthropic-compatible gateway in front of all your providers, with a dashboard for accounts, routing, model catalogs, and cost analytics.

Deploys the official ghcr.io/montara-project/tera-router:v1.23.0 image with a headroom sidecar (ghcr.io/headroomlabs-ai/headroom:0.41.0) for the optional Token Saving feature, and a persistent terarouter-data volume for the SQLite database (migrations and seeding run on boot).

Adaptations from the upstream deploy/docker-compose.yaml:

  • ports/profiles removed — dashboard + API routed via Dokploy domain on port 8080; the headroom sidecar is included unconditionally (internal-only, protected by a generated HEADROOM_PROXY_TOKEN)
  • Required vars generated: MACHINE_ID (16-bit number → ${randomPort}), APP_SECRET (≥32 chars → ${base64:48}), ADMIN_EMAIL/ADMIN_PASSWORD for the seeded dashboard admin
  • API_URL set to the public domain — required behind a proxy and written into agent skill guides
  • CORS_ALLOWED_ORIGINS scoped to the deployed domain (upstream defaults to *)
  • TRUSTED_PROXIES set to private ranges — no published port means all traffic arrives via Traefik, so X-Forwarded-For can be trusted
  • Upstream /health healthcheck kept; SENTRY_DSN, OIDC_*, RATE_LIMIT_EXEMPT_IPS left out (optional, empty by default)

First boot runs migrations and seeds the admin account — sign in with the generated ADMIN_EMAIL/ADMIN_PASSWORD from the environment.

Checklist

Before submitting this PR, please make sure that:

Issues related (if applicable)

N/A

Screenshots or Videos

screenshot-2026-11-12-143513

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
templates ✅ Ready (View Log) Visit Preview 8353911

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Siumauricio

Copy link
Copy Markdown
Contributor

I pushed a small fix: the healthcheck used || inside a CMD array, so wget received it as arguments and the container never became healthy (Traefik then returned 404). It now runs via CMD-SHELL. Tested on Dokploy: UI loads and both services are healthy.

Approved, thanks!

@Siumauricio Siumauricio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, thanks!

@Siumauricio
Siumauricio merged commit 145076b into Dokploy:canary Nov 13, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8353911b Deployed Nov 13, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants