linuxserver / docker-mastodon

GNU General Public License v3.0
78 stars 15 forks source link

[BUG] v4.2.0-beta1 will build but will result in an unusable image the alpine base needs updating #61

Closed YourAutisticLife closed 1 year ago

YourAutisticLife commented 1 year ago

Is there an existing issue for this?

Current Behavior

It is possible to build an image with the current Dockerfile. However, this build will fail. The failure is not evident.

  1. In the Mastodon web GUI the symptom is that in the advanced GUI setup, those columns that follow specific hashtags won't update.

  2. If you open the console in Chrome and check what's going on with the WebSocket connection, you'll see it periodically restart, and there will be no traffic from the server.

  3. What happens is that the streaming server crashes after a bit of time. I do not know why it crashes. It is restarted, but then it crashes again. The failing service is defined here: /etc/services.d/streaming

Expected Behavior

The streaming server shouldn't crash.

I fixed it with:

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17

However, this created more problems as my PUID and PGID of 1000 cause problems inside the container. I had to set them to 911 for my code to run at all. When I checked, I saw that directories were created with incorrect ownership. I'm not sure what the proper fix is here.

(Note that it is possible that this bug also happens with the v4.1.6 codebase. That was the first codebase that I used. However, the problem is subtle and I may have missed it.)

Steps To Reproduce

Build the image using v4.2.0-beta1.

Environment

- OS:Debian 12
- How docker service was installed: apt (but that's not important).

CPU architecture

x86-64

Docker creation

N/A

Container logs

N/A
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thespad commented 1 year ago

There is an open PR to resolve the issues https://github.com/linuxserver/docker-mastodon/pull/57 that are a result of them bumping the Ruby and Node minimum versions in 4.2.0

YourAutisticLife commented 1 year ago

Great! Still unsure about what's going on with PUID and PGID, however. My fix works for me, but it may not work for everybody. (Actually, I'm pretty sure my fix is not generalizable. I just don't have time to investigate.)

thespad commented 1 year ago

If you just updated the base and nothing else you're going to get issues with order of operations as our newer base images will execute the old-style init scripts in parallel, which is probably why your permissions were all messed up.

YourAutisticLife commented 1 year ago

I see. I'm looking forward to the update. I'm already running a custom image made with your Dockerfile in production, but I'm the only user of my instance right now, so I can play fast and loose.

If I get users, I'll probably have to spin up a testing instance, so as to not throw them under the bus with my... er... experiments.

thespad commented 1 year ago

Merged PR build is complete if you want to try it out

YourAutisticLife commented 1 year ago

Okay. I'll get on it. Thanks!

YourAutisticLife commented 1 year ago

It looks good. I'm closing this issue since I don't see anything left that needs any action on anybody's part.