• 0 Posts
  • 3 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle


  • Hey - I found the same thing WRT the docker files - the compose files from the official project are ever-so-subtly wrong.

    Tagging a docker network as internal blocks outside network comms afaik so the default compose file essentially puts the lemmy server inside its own little sandbox and prevents it from communciating with other servers.

    The solution I found was to add lemmy to both the internal network and the external proxy network:

    
    ## this is what the networks part looks like by default
    networks:                                                                                                                                                   
      # communication to web and clients                                                                                                                        
      lemmyexternalproxy:                                                                                                                                       
      # communication between lemmy services                                                                                                                    
      lemmyinternal:                                                                                                                                            
        driver: bridge                                                                                                                                          
        internal: true            
    
    #... other stuff here
    #lemmy service inside your services: section
      lemmy:
        image: dessalines/lemmy:0.17.3
        hostname: lemmy
        networks:
          - lemmyinternal
          - lemmyexternalproxy # this is the important addition
        restart: always
        environment:
          - RUST_LOG="warn,lemmy_server=info,lemmy_api=info,lemmy_api_common=info,lemmy_api_crud=info,lemmy_apub=info,lemmy_db_schema=info,lemmy_db_views=info,l
    emmy_db_views_actor=info,lemmy_db_views_moderator=info,lemmy_routes=info,lemmy_utils=info,lemmy_websocket=info"
        volumes:
          - ./lemmy.hjson:/config/config.hjson
        depends_on:
          - postgres
          - pictrs
    
    

    Another thing I noticed was that in the documentation they bind nginx on port 80 but the docker-compose provided binds to port 8536 which is the default port that lemmy seems to listen on. I bound 8536 to my host machine and use caddy as a reverse proxy (because it does letsencrypt for you which is nice).

    (Writing to you now from my self-hosted instance which I set up with the above notes)