Displaying star rating with Discourse is easy. I am happy to share, It can be done in simple few steps
Setup Google Tag Manager for your Discourse Application
Add a new HTML Tag containing JSON-LD markup
Filter trigger by page view for particular URL
Publish, wait for 24 hrs to see the result in SERPs.