Flat File CMS 輕快且容易使用,唯一缺憾就是沒有比較好的評論系統。
最近研究 open source comment system,找到了 remark42 。
Remark42 不追蹤使用者紀錄,可 Google、Facebook、Github 等平台登入,也可單純用 email 或匿名留言。
系統只要簡單指令或 Docker 即可立即建構完成。

分享一下配置檔,也許可以給其他人設置上作為參考。
(沒有串接其他社群平台,僅開放以 email 方式登入留言)

docker-compose.yaml

version: "2"

services:
  remark:
    # remove the next line in case you want to use this docker-compose separately
    # as otherwise it would complain for absence of Dockerfile
    build: .
    image: umputun/remark42:latest
    container_name: "remark42"
    hostname: "remark42"
    restart: always
    network_mode: host

    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "5"

    # uncomment to expose directly (no proxy)
    #ports:
    #  - "80:8080"
    #  - "443:8443"

    environment:
      - REMARK_URL=https://remark42.example.com/
      - SITE=your_site_id  # site ID 不要使用符號, 系統會無法正常運作
      - SECRET=your_secret_string
      - DEBUG=true
      - ALLOWED_HOSTS=example1.com,example2.com
      - AUTH_SAME_SITE=none
      - AUTH_GOOGLE_CID
      - AUTH_GOOGLE_CSEC
      - AUTH_GITHUB_CID
      - AUTH_GITHUB_CSEC
      - AUTH_FACEBOOK_CID
      - AUTH_FACEBOOK_CSEC
      - AUTH_DISQUS_CID
      - AUTH_DISQUS_CSEC
      - EMOJI=true
      - AUTH_EMAIL_ENABLE=true
      - NOTIFY_USERS=email
      - NOTIFY_ADMINS=email
      - ADMIN_SHARED_EMAIL=your_email@example.com
      - ADMIN_SHARED_ID=
      - SMTP_HOST=smtp_host_address
      - SMTP_PORT=465
      - SMTP_TLS=true
      - SMTP_STARTTLS=true
      - SMTP_USERNAME=your_email@example.com
      - SMTP_PASSWORD=your_password
      - AUTH_EMAIL_FROM=your_email@example.com
      - NOTIFY_EMAIL_FROM=your_email@example.com
      - AUTH_ANON=false
      - TIME_ZONE=Asia/Taipei
      # Enable it only for the initial comment import or for manual backups.
      # Do not leave the server running with the ADMIN_PASSWD set if you don't have an intention
      # to keep creating backups manually!
      # - ADMIN_PASSWD=<your secret password>
    volumes:
      - ./var:/srv/var

Next Post Previous Post