souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
389 stars 62 forks source link

Commento++

πŸ’¬ Try it out and deploy your own

LIVE DEMO

Deploy to Heroku

Deploy on Railway

❓ About

Commento++ is a free, open source, fast & lightweight comments box that you can embed in your static website instead of Disqus.

⚑ Features

🀝 Support

Please (donate) if you find my work helpful (this will always remain free and open source)!

πŸ“· Screenshots

Commento++ in action

πŸ€” How is this different from Disqus, Facebook Comments, and the rest?

Get started

To start you just need to launch an instance.

The button below will work for a Heroku account:

Deploy

The button below will work for a free Railway account:

Deploy on Railway

Otherwise, most of the below is the same as documented at https://docs.commento.io

If you want to self-host, you will need a PostgreSQL server handy and then: 1) Use this repo's Dockerfile if you're into that kind of thing 2) Download the plug and play pre-compiled version from the releases 3) To build yourself, you can clone this repo (you will require nodejs, yarn, golang installed) and run make prod and you will generate ./build/prod/commento

To launch, you should configure the following environment variables below:

$ export COMMENTO_ORIGIN=http://commento.example.com:8080
$ export COMMENTO_PORT=8080
$ export COMMENTO_POSTGRES=postgres://username:password@postgres.example.com:5432/commento?sslmode=disable
$ export COMMENTO_CDN_PREFIX=$COMMENTO_ORIGIN

And then you can run the commento binary.

Logging and graphing page views

The logging defaults to off to preseve disk space, but you can specify the COMMENTO_ENABLE_LOGGING environment variable to true to enable each page view being logged and a nice graph generated on your dashboard. This will however use up a lot of space quickly if you have a high traffic website; you may want to consider a more fully-featured analytics solution for your website.

e.g.

$ export COMMENTO_ENABLE_LOGGING=true

to turn this feature on.

Wildcard domain support

A new feature added recently, with better edge-case handling of domain names, etc.

This feature however will open up your commento instance to abuse if it is shared between a lot of people (e.g. people registering e% to register every domain beginning with e...)

As most of commento++ instances are serving one user only, I have assumed you will be sensible about this and enabled wildcard domain support by default.

If you want the old behaviour, you can disable this with an environment variable:

$ export COMMENTO_ENABLE_WILDCARDS=false

Perspective spam detection

To enable Perspective (https://www.perspectiveapi.com/) spam detection add following environment variables:

$ export COMMENTO_PERSPECTIVE_KEY=YOUR_API_KEY_FROM_PERSPECTIVE
$ export COMMENTO_PERSPECTIVE_LIMIT=0.5
$ export COMMENTO_PERSPECTIVE_LANGUAGE=en

COMMENTO_PERSPECTIVE_KEY: To create a new Perspective API key follow the instructions at https://developers.perspectiveapi.com/s/docs-get-started

COMMENTO_PERSPECTIVE_LIMIT: The limit defines the minimum value for the Perspective probability summary score. Everything above the value will be flagged in Commentoplus. (Default 0.5)

COMMENTO_PERSPECTIVE_LANGUAGE: Configure the language to your requirements. (Default: en)

Make sure that you have enabled the automatic spam detection in the dashboard.

Disabling SMTP Host verification check

Commento++ allows configuration of the tlsConfig for both SMTPS as well as StartTLS for email sending. For context, this is required for the https://cloudron.io/ app package.

To skip SMTP hostname verification, use:

$ export SMTP_SKIP_HOST_VERIFY=true

STARTTLS

If you have any issues with email sending relating to not using STARTTLS, consider:

$ export USE_STARTTLS=true

Docker setup

Alternatively you can use the pre-build images from:

Instructions for configuring the docker image can be found here. Are you missing a version? Please contact @caroga here.

Finally

Once you have created an account in your commento instance, it should give you instructions on how to embed this into your site! It should be as simple as:

<script defer src="https://(server url)/js/commento.js"></script>
<div id="commento"></div>

If you're running this behind nginx/another reverse proxy

Remember to either forward the websockets through to commento in your nginx config, e.g.:

location / {
    proxy_pass http://commento;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
}

Or if you'd rather not do that, disable websockets in favour of HTTP polling by adding data-no-websockets="true" to the commento Githubissues.

  • Githubissues is a development platform for aggregating issues.