# One hostname fronts both services. Set TARES_DOMAIN=demo.tares.example.com for automatic HTTPS;
# unset, compose passes ":80" so it serves plain HTTP on :80 (local testing).
{$TARES_DOMAIN} {
	# the remote MCP endpoint (streamable-http mounts at /mcp) — route it before the catch-all,
	# since taresd serves the SPA for every other path
	handle /mcp* {
		reverse_proxy mcp:8788
	}
	handle /sse* {
		reverse_proxy mcp:8788
	}
	# console UI + API + ingest
	handle {
		reverse_proxy taresd:8787
	}
}
