I’m trying to deploy my own instance following install with docker but seems it’s not up to date. Or am I missing something?

Not sure if it’s relevant, the version of the files to download is 0.17 instead of 0.17.3 as the latest release in the github repo.
Also, I’m guessing I’d need to download the rest of the files listed in the prod folder, not just the two in the documentation
https://github.com/LemmyNet/lemmy/tree/0.17.3/docker/prod

Also, I’m trying to use Caddy, I’m guessing I should replace nginx in the docker-compose.yml, correct?
Or can I use the Caddy service of the host machine instead of a new docker container?

  • Neuromancer@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I’m not sure if I should make a new post or keep this in a single thread, anyway, I’ve managed to get the front page to load, but can’t get any farther.

    I used the instructions from @jax@lemmy.cloudhub.social’s branch, particularly their nginx config.

    I’m running the whole docker-compose setup behind my own nginx reverse proxy, which is set to proxy requests to the docker nginx (and also handles SSL). I modified the docker-compose.yml to bind the host port on 9001, then my main nginx config looks like this:

    http {
        server {
            listen 443 ssl http2;
            server_name lemmy.villa-straylight.social;
            ssl_certificate /etc/letsencrypt/live/<redacted>
            ssl_certificate_key /etc/letsencrypt/live/<redacted>
    
            location / {
                proxy_set_header Host $host;
                proxy_pass http://localhost:9001;
            }
        }
    }
    

    The front page loads, but pretty much anything else I do results in an endless spinner. The only possible problem I see is this in the docker terminal output:

    WARN Error encountered while processing the incoming HTTP request: lemmy_server::root_span_builder: WebSocket upgrade is expected. NoWebsocketUpgrade

    • jax@lemmy.cloudhub.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Yeah, that sounds like a web sockets issue. I think one part of the nginx.conf file from my docs has proper web sockets handling that you can copy into your config.

    • kosmo@satl.ink
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Your reverse proxy is doing websockets incorrectly, there’s some bogosity in the spec for websockets that makes them single hop and the proxy needs to propagate the upgrade request. Search for “nginx reverse proxy websocket”, e.g. https://www.nginx.com/blog/websocket-nginx/

      • Neuromancer@lemmy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Thanks, that’s the missing piece. Ironically I am a software engineer in my day job, but not the right kind of software engineer. It’s fun to broaden my horizons though. I copied the proxy settings from the @jax@lemmy.cloudhub.social’s nginx.conf with the right edits for the hostname into my reverse proxy config and now everything appears to be working!