snikket-im / snikket-server

Image builder for Snikket server
https://snikket.org/service/
Apache License 2.0
265 stars 30 forks source link

Improving docker-compose.yml #216

Open dashohoxha opened 7 months ago

dashohoxha commented 7 months ago

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.