Commento is open source tool for adding comments to webpage.
Documentation describes how to compile from source, this note is just step by step reference for OpenSUSE platform.
IMPORTANT: TLS termination is not covered here, only running Commento. TLS Terminating proxy is not covered here.
Install packages using zypper
ROOT ACCESS
zypper install nodejs10 go
npm install -g yarn
go
is needed to compile the codenodejs
is only needed to have npm
to install yarn
.
As of writing there’s no yarn
package in official OpenSUSE repos,
hence this workaround.-g
flag is important as it exposes yarn
binary in PATH
Checkout source form Gitlab
Commento Source is kept on GitLab,
so git
is needed for checkout.
git clone https://gitlab.com/commento/commento.git
Compile Commento
Build supports two targets devel
and prod
.
cd commento
make prod
Install database server and client software ROOT ACCESS
zypper install postgresql12 postgresql12-server
Enable and start service ROOT ACCESS
systemctl enable postgresql
systemctl start postgresql
Create role and database for Commento ROOT ACCESS
su postgres
psql
Inside psql
shell
CREATE ROLE commento WITH PASSWORD 'commento';
ALTER ROLE "commento" WITH LOGIN;
CREATE DATABASE commento OWNER commento;
Update configuration in pg_hba.conf
cd /var/lib/pgsql/data/
vim pg_hba.conf
Create config file for Commento
# Origin
COMMENTO_ORIGIN=http://195.201.1.242:8071
# Server bind
COMMENTO_BIND_ADDRESS=195.201.1.242
COMMENTO_PORT=8071
# PostgreSQL
COMMENTO_POSTGRES=postgres://commento:commento@127.0.0.1:5432/commento?sslmode=disable
Export config file location
export COMMENTO_CONFIG_FILE=~/path/to/file/commento.env
Allow port on firewall ROOT ACCESS
firewall-cmd --zone=public --add-port=8071/tcp --permanent
firewall-cmd --reload
Start Service From Commento source directory
./build/prod/commento