• 2 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle












  • I would recommend you ditch the second nginx layer. It’s a waste of resources and it can cause a multitude of issues if the configuration isn’t done correctly.

    • If you are hosting multiple domains on the same server, disable the nginx container in the docker-compose.yml file and copy Lemmy’s nginx config into your system’s nginx config (e.g. /etc/nginx/).
      • If you go this route you should also delete the lemmyexternalproxy network, delete internal: true on the lemmyinternal network (required to enable port forwarding) and add port forwards to the lemmy and lemmy-ui docker services. Here’s what that would look like: https://www.diffchecker.com/vjfEFuz6/
    • If you are not hosting multiple domains on the same server, simply edit the port forwards in the docker-compose.yml file for the proxy service to bind to whatever your external facing IP is.


  • Postgres is a database. Websockets is a communication method between the browser and the server.

    So the infrastructure is like this:

    Browser <--Websockets--> Server <--> Postgres
    

    So there’s a couple problems here. First of all, websockets are very resource heavy so too many of them will slow down the server, that’s why they are working on replacing websockets with something else. And second, the database (Postgres) is getting overloaded so they need to figure out how to scale it up or use it more efficiently.