Isso multisite using Docker


This is probably going to be a short and sweet post. I was trying to set up Isso, since I didn’t really like Remark42. As always, I was going with the Docker install option, but I kept running into issues setting up multisite - I needed one Isso instance to provide commenting for all of my Hugo sites.

After one Github issue, which really should have been a Discussion - but I thought I had encountered a bug, it was pointed out that I needed run Isso with isso.dispatch instead of isso.run. The Dockerfile from which the image is built has isso.run in its CMD. After discovering that (or rather after being pointed out), I just overrode it in my docker-compose.yml -

---
services:
  isso-comments:
    image: ghcr.io/isso-comments/isso:0.13.0
    container_name: "isso-comments"
    entrypoint: ["/isso/bin/gunicorn", "-b", "0.0.0.0:8080", "-w", "4", "--preload", "--worker-tmp-dir", "/dev/shm"]
    command: ["isso.dispatch"]
    restart: unless-stopped

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

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

    # uncomment to expose to reverse proxy running on the same host but not in docker
    ports:
      - "127.0.0.1:8080:8080"

    volumes:
      - ./config:/config
      - ./db:/db

    environment:
      ISSO_SETTINGS: "/config/astaraday.cfg;/config/waistdeepinthought.cfg"

For reference, this was the original error I had got with the container constantly restarting -

isso-comments  | Traceback (most recent call last):
isso-comments  |   File "/isso/bin/gunicorn", line 8, in <module>
isso-comments  |     sys.exit(run())
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
isso-comments  |     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/app/base.py", line 231, in run
isso-comments  |     super().run()
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/app/base.py", line 72, in run
isso-comments  |     Arbiter(self).run()
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/arbiter.py", line 58, in __init__
isso-comments  |     self.setup(app)
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/arbiter.py", line 118, in setup
isso-comments  |     self.app.wsgi()
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
isso-comments  |     self.callable = self.load()
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
isso-comments  |     return self.load_wsgiapp()
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
isso-comments  |     return util.import_app(self.app_uri)
isso-comments  |   File "/isso/lib/python3.10/site-packages/gunicorn/util.py", line 359, in import_app
isso-comments  |     mod = importlib.import_module(module)
isso-comments  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
isso-comments  |     return _bootstrap._gcd_import(name[level:], package, level)
isso-comments  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
isso-comments  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
isso-comments  |   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
isso-comments  |   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
isso-comments  |   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
isso-comments  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
isso-comments  |   File "/isso/isso/run.py", line 17, in <module>
isso-comments  |     config.load(
isso-comments  |   File "/isso/isso/config.py", line 152, in load
isso-comments  |     with open(user, 'r') as f:
isso-comments  | FileNotFoundError: [Errno 2] No such file or directory: '/config/astaraday.cfg;/config/waistdeepinthought.cfg'
isso-comments exited with code 1 (restarting)