OttPeterR / addon-babybuddy

BabyBuddy, wrapped into a Home Assistant addon
35 stars 13 forks source link

Remove nginx rewrite rules, add static and media paths to nginx #76

Closed MrApplejuice closed 2 weeks ago

MrApplejuice commented 4 months ago

Required when https://github.com/babybuddy/babybuddy/pull/852 is merged. Addresses issue https://github.com/babybuddy/babybuddy/issues/844

I moved the rewrites (not literally but conceptually) into the django middleware in https://github.com/babybuddy/babybuddy/pull/852. The rewrite rules in nginx are gone.

I also added /static and /media path routing to the nginx configuration because ... that is how it is supposed to work in django if I am not mistaken. I am not quite sure how the /static content was served before, but /media content did not seem to be served at all, right?

OttPeterR commented 4 months ago

Media was broken before, correct.

Another issue I'm hitting when trying to update to the latest BB version is issues with the rarer architectures, so not amd64 or aarch64, but the other three. According to dockerhub those downloads are pretty rare. But I bring this up because we may have to drop support for those on the next release.

See the build checks that are failing in #73

MrApplejuice commented 4 months ago

Hey!

Dropping armv7 and armhf is probably a bit of a bummer. I think that this will drop support for raspberry pi's which, I think are still a quite popular low-cost way of running home assistant...

When quickly checking the logs, it seems that the ninja install fails? That should not be a hard dependency afterall, I think. I think we can work around that, either by installing ninja via a side-channel (and not pip) or by using a different build-toolchain for whatever is trying to use ninja... I can maybe have a look later this week!

OttPeterR commented 4 months ago

I'd really appreciate it if you took a look at it. When I last tried it was like playing whack a mole after each error was fixed a new one showed up. But hey it's worth a shot!

As a heads up for your dev testing, the GitHub builds for one of those other architectures (I forget which) can take up to an hour - so put in a change then go do something else for a bit lol

cdubz commented 4 months ago

Just chiming in that I’d very much like to avoid dropping support for any archs. Baby Buddy already does some stuff weirdly to ensure support for smaller user bases. I’m traveling for another 1.5 weeks but I can also help look at that aspect when I’m back., if needed.

MrApplejuice commented 3 months ago

Hi... sorry for my sudden absence. I got ill, and did spent my time in bed instead of fixing issues. I am back out of bed now, nut need to get going again. Going to be picking this up again now...

MrApplejuice commented 1 month ago

@OttPeterR - I revived my work on https://github.com/babybuddy/babybuddy/pull/852 . If that one gets merged, this one should be merged, too, before the next home assistant release that includes patch 852. I quickly tested the container builds for homeassistant as well and all cross-compiled versions work at the moment!

OttPeterR commented 1 month ago

Thats awesome news! To clarify, do you need me to do anything on my end or are your tests able to be put into this PR?

MrApplejuice commented 1 month ago

Hi!

I do not quite understand what you mean with:

or are your tests able to be put into this PR


do you need me to do anything

For that: Not really. This needs to be merged after https://github.com/babybuddy/babybuddy/pull/852 was merged so that the homeassistant addon still works. That is all.

OttPeterR commented 2 weeks ago

sorry for the late follow-up... Also I have no idea what I was saying about "tests" so disregard that entirely lol

Those GitHub actions fail to build when the base HA image isnt the most up to date and some SSL dependencies are deprecated. Once I get #73 taken care of to make all the architectures build properly, this can go right in!

OttPeterR commented 2 weeks ago

Can you update this to the new head? https://github.com/OttPeterR/addon-babybuddy/tree/v2.4.0 It should build properly after that and I'll get it merged in for a new release!

edit: never mind it can just go right in 😅

MrApplejuice commented 2 weeks ago

I was about to acknowledge that I read your post and could have acted on it this evening (CEST) or tomorrow morning. Thanks for merging! Very self sufficient. :crossed_fingers: that it works as tested locally!