OpenSUSE Compile and Run Commento

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 Compilation Dependencies

  1. Install packages using zypper ROOT ACCESS

    zypper install nodejs10 go
    npm install -g yarn
    • go is needed to compile the code
    • Package nodejs 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

Compilation from Source

  1. Checkout source form Gitlab

    Commento Source is kept on GitLab, so git is needed for checkout.

    git clone https://gitlab.com/commento/commento.git
  2. Compile Commento
    Build supports two targets devel and prod.

    cd commento
    make prod

PostgreSQL Database

  1. Install database server and client software ROOT ACCESS

    zypper install postgresql12 postgresql12-server
  2. Enable and start service ROOT ACCESS

    systemctl enable postgresql
    systemctl start postgresql
  3. Create role and database for Commento ROOT ACCESS

    su postgres

    Inside psql shell

    CREATE ROLE commento WITH PASSWORD 'commento';
    ALTER ROLE "commento" WITH LOGIN;
    CREATE DATABASE commento OWNER commento;
  4. Update configuration in pg_hba.conf

    cd /var/lib/pgsql/data/
    vim pg_hba.conf

Commento Runtime Config

  1. Create config file for Commento

    # Origin
    # Server bind
    # PostgreSQL
  2. Export config file location

    export COMMENTO_CONFIG_FILE=~/path/to/file/commento.env
  3. Allow port on firewall ROOT ACCESS

    firewall-cmd --zone=public --add-port=8071/tcp --permanent
    firewall-cmd --reload
  4. Start Service From Commento source directory