Maksim Stojkovic

Adding comments to static websites

To make this blog a little more interactive, I thought it'd be a good idea to implement a system for commenting on posts.

After doing a little research, I came across Remark42 (GitHub). Skimming through the docs, it has all the features I think make a good commenting system, in addition to being deployable on an ARM64 VM using Docker. Given it met my criteria, I spent a little time getting it online (including setting up SSL) and integrating it into the blog's templating system (scroll to the bottom of the page to see it in action).

Below is an example Remark42 Docker Compose file. Remember to update the environment variables based on the docs.

It's also recommended that you setup SSL for your comment server (e.g. using an nginx reverse-proxy such as SWAG).

services:
  remark42:
    image: umputun/remark42:latest
    container_name: remark42
    environment:
      - APP_UID=1000
      - TIME_ZONE=Etc/UTC
      - REMARK_URL=https://domain.com
      - SECRET=0000000000000000000000000000000000000000
      - ADMIN_SHARED_ID=github_0000000000000000000000000000000000000000
      - [email protected]
      - ADMIN_EDIT=true
      - SIMPLE_VIEW=true
      - IMAGE_MAX_SIZE=0
      #- AUTH_ANON=true
      - AUTH_EMAIL_ENABLE=true
      - AUTH_GITHUB_CID=00000000000000000000
      - AUTH_GITHUB_CSEC=0000000000000000000000000000000000000000
      - NOTIFY_ADMINS=email
      - NOTIFY_USERS=email
      - SMTP_HOST=smtp.server.com
      - SMTP_PORT=465
      - SMTP_TLS=true
      - [email protected]
      - SMTP_PASSWORD=0123456789abcdef
      - [email protected]
      - [email protected]
      #- DEBUG=true
    volumes:
      - /srv/docker/remark42/var:/srv/var
    ports:
      - 8080:8080
    restart: unless-stopped

Tags: #100DaysToOffload #Docker #Selfhost