snikket-server icon indicating copy to clipboard operation
snikket-server copied to clipboard

Improving docker-compose.yml

Open dashohoxha opened this issue 1 year ago • 0 comments

I have a couple of proposals that in my opinion would improve docker-compose.yml.

  1. Instead of /etc/snikket/, why not use /root/snikket/ as the main installation directory?

  2. Why not use local volume directories, like this:

    volumes:
      - ./data:/snikket
      - ./data/acme_challenges:/var/www/html/.well-known/acme-challenge
    

    This way, everything about Snikket will be located in a single directory (/root/snikket/), and this would make backup/restore easier.

  3. Why not merge snikket_certs and snikket_proxy in a single container? They already use tini anyway. Actually, it would be ideal (in my opinion) to include all the services in a single container. Discourse does this, for example, and Snikket is nowhere as complex as Discourse.

  4. Instead of network_mode: host (which of course, makes docker-compose.yml simpler), forwarding only the required ports would be cleaner, in my opinion. Yes, docker is not very efficient when you forward a range of ports (the UDP ports of the TURN server), but this range doesn't have to be very big; 100 or 200 ports are more than enough for almost all the cases.

dashohoxha avatar Feb 18 '24 21:02 dashohoxha