Is docker documentation up to date?

3 years ago by pe1uca to c/lemmy_support

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/...

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?

jax 9 points 3 years ago path: 0 2166, hotness: undefined, score: 9, children: 3
darkfoe 3 points 3 years ago

The hero we need.

path: 0 2166 2188, hotness: undefined, score: 3, children: 0
RoundSparrow 0 points 3 years ago

Ok, looking at it after it was committed:

https://github.com/...

The instructions are not very clear on the proxy setup. It kind of hand-waves a suggested config after the "To make Lemmy available outside the server, you need to set up a reverse proxy, like Nginx. You can use the following simple proxy:" preface, but is not really specific which file this goes in. Is this appended to the nginx.conf?

Thank you

path: 0 2166 5848, hotness: undefined, score: 0, children: 1
jax 1 point 3 years ago

I mostly didn't touch that part, it seemed to be outside the scope of the article and suggesting a config for each person's exact setup isn't going to be possible.

This would be for putting in front of the nginx proxy built into the compose file. In theory you could do SSL offloading here or whatever you want, as long as you don't change the headers needed by the nginx.conf file further up the page.

path: 0 2166 5848 5849, hotness: undefined, score: 1, children: 0
Neuromancer 4 points 3 years 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

path: 0 2717, hotness: undefined, score: 4, children: 4
kosmo 2 points 3 years 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/

path: 0 2717 2951, hotness: undefined, score: 2, children: 2
Neuromancer 3 points 3 years 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!

path: 0 2717 2951 4902, hotness: undefined, score: 3, children: 1
jax 2 points 3 years ago

Glad it's working for you!

path: 0 2717 2951 4902 4908, hotness: undefined, score: 2, children: 0
jax 2 points 3 years 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.

path: 0 2717 3090, hotness: undefined, score: 2, children: 0
scrubbles 3 points 3 years ago

There were some issues for me when I set mine up, what issues are you having? I am using 0.17.3 personally.

Should only need docker compose, lemmy.hjson, and an nginx proxy conf file if you use it, but sounds like you're using something else

path: 0 1940, hotness: undefined, score: 3, children: 0
wizjenkins 3 points 3 years ago

I just finished my setup and I had to do A LOT of tweaking to get it to all stand up and talk it everything correctly. The documentation (and even the Ansible script) is not up to date sadly.

Feel free to message me and I can share my configs with you. They worked on a dedicated VM.

path: 0 7409, hotness: undefined, score: 3, children: 0
admin 2 points 3 years ago

You should be able to use any reverse proxy to replace the one it includes, but you'll want to understand the various things that need to happen. Specific HTTP methods and content-types must be routed to the lemmy and not the lemmy-ui container, and not all of these (e.g. paths) are well documented...I just found this out the hard way: watch the caddy logs carefully as you are dealing with federation issues.

path: 0 2183, hotness: undefined, score: 2, children: 0
duskfall 1 point 2 years ago
path: 0 15048232, hotness: undefined, score: 1, children: 0
RoundSparrow 1 point 3 years ago path: 0 5558, hotness: undefined, score: 1, children: 3
pe1uca 4 points 3 years ago path: 0 5558 5608, hotness: undefined, score: 4, children: 2
jax 0 points 3 years ago

Some people are reporting outbound networking issues/DNS resolution in the lemmy matrix chat, I wonder if you're hitting the same thing. Do you see anything about DNS resolution errors in the logs when trying to search for other communities?

path: 0 5558 5608 6026, hotness: undefined, score: 0, children: 1
pe1uca 1 point 3 years ago

The issue in this post for me was already fixed.
Now I do have another issue, not sure if it's related to what you're mentioning.

I'm getting this error when trying to search for a community in another instance.

HTTP request{http.method=GET http.scheme="https" http.host=lemmy.pe1uca.dev http.target=/api/v3/ws otel.kind="server" request_id=36d10fe3-81a9-45f0-b39a-5299b2760ed6 http.status_code=101 otel.status_code="OK"}: lemmy_server::api_routes_websocket: couldnt_find_object: Request error: error sending request for url (https://lemmy.one/c/privacyguides): operation timed out

Here's the post https://lemmy.one/post/16124

path: 0 5558 5608 6026 6027, hotness: undefined, score: 1, children: 0
lemmy_support

@lemmy.ml

login for more options
5110
1593
92

Support / questions about Lemmy.

Matrix Space: #lemmy-space

go to feed...