• 0 Posts
  • 28 Comments
Joined 1 year ago
cake
Cake day: July 14th, 2023

help-circle

  • If you use that docker compose file, I recommend you comment out the build section and uncomment the image section in the lemmy service.

    I also recommend you use a reverse proxy and Docker networks rather than exposing the postgres instance on port 5433, but if you aren’t familiar with Docker networks you can leave it as is for now. If you’re running locally and don’t open that port in your router’s firewall, it’s a non-issue unless there’s an attacker on your LAN, but given that you’re not gaining anything from exposing it (unless you need to connect to the DB directly regularly - as a one off you could temporarily add the port mapping), it doesn’t make sense to increase your attack surface for no benefit.


  • I had a pocket TV back in 2007 or so. It had an antenna and everything. It was a bit bulky and not at all power efficient, though. IIRC it went through 8 AA batteries in about 3 hours.

    I’m not sure why you’d want that over a smartphone or even just a small tablet, though.

    Also, we have flying skateboards, they’re just prohibitively expensive or not yet being sold. Look up the ArcaBoard (was $20k back in 2015, doesn’t seem to be sold anymore), the Lexus Hoverboard, and the Flyboard Air. Unfortunately if you try to buy a “hoverboard” you’re just gonna end up with an electric scooter


  • I haven’t personally used any of these, but looking them over, Tipi looks the most encouraging to me, followed by Yunohost, based largely on the variety of apps available but also because it looks like Tipi lets you customize the configuration much more. Freedom Box doesn’t seem to list the apps in their catalog at all and their site seems basically useless, so I ruled it out on that basis alone.


  • I am trying to avoid having to having an open port 22

    If you’re working locally you don’t need an open port.

    If you’re on a different machine but on the same network, you don’t need to expose port 22 via your router’s firewall. If you use key-based auth and disable password-based auth then this is even safer.

    If you want access remotely, then you still don’t have to expose port 22 as long as you have a vpn set up.

    That said, you don’t need to use a terminal to manage your docker containers. I use Portainer to manage all but my core containers - Traefik, Authelia, and Portainer itself - which are all part of a single docker compose file. Portainer stacks accept docker compose files so adding and configuring applications is straightforward.

    I’ve configured around 50 apps on my server using Docker Compose with Portainer but have only needed to modify the Dockerfile itself once, and that was because I was trying to do something that the original maintainer didn’t support.

    Now, if you’re satisfied with what’s available and with how much you can configure it without using Docker, then it’s fine to avoid it. I’m just trying to say that it’s pretty straightforward if you focus on just understanding the important parts, mainly:

    • docker compose
    • docker networks
    • docker volumes

    If you decide to go that route, I recommend TechnoTim’s tutorials on Youtube. I personally found them helpful, at least.


  • This is a very surface level overview of the frameworks it covers. The title is a bit of a reach, as it wouldn’t give anyone enough information to make a more educated decision about which framework to use.

    Are you the author? I think it could be improved by including:

    • metrics - number of apps that use each, number of job offerings, github stars
    • who backs each project, and how much can we trust them to continue developing it in a way that’s friendly to developers
    • for React specifically, a bit more info on the prominent frameworks - Next.js, Vite, Gatsby, CRA/CRACO, or ejected CRA - since the difference between them is substantial
    • a high level description of the use case that the framework is designed for, as well as use cases where it isn’t well suited or has drawbacks.
    • how does the development experience differ? Is there a lengthy build step? Does it offer hot reloading? Does it come with a built-in linter or integrate easily with one?
    • Does it have a bundled testing framework, and how does that compare to other offerings? For example, CRA comes with jest and it can be a pain to configure jest to properly handle all of your dependencies - it doesn’t use the same build pipeline as your app and will fail if you’re using newer dependencies that use import statements instead of module.exports and you don’t individually configure each one. Vitest, by contrast, uses the same build pipeline as Vite.
    • Ease of writing unit tests, component tests, and e2e tests (even if that means pulling in another library)
    • ease of use with or without typescript
    • some more substantial example apps per framework, like a to-do list that uses a simple API (preferably the same API in all cases). Currently the examples don’t even show what the code looks like with basic styling

    If you are the author, I saw your article on Typescript and would also like to say that you can configure your linter to not warn about using any. There’s even a no-implicit-any rule that you can use if you only want explicit any types but don’t want, for example, responses from API calls to have that type by default.


  • I’m not addressing anything Gitea has specifically done here (I’m not informed enough on the topic to have an educated opinion yet), but just this specific part of your comment:

    And they also demand a CLA from contributors now, which is directly against the idea of FOSS.

    Proprietary software is antithetical to FOSS, but CLAs themselves are not, and were endorsed by RMS as far back as 2002:

    In contrast, I think it is acceptable to … release under the GPL, but sell alternative licenses permitting proprietary extensions to their code. My understanding is that all the code they release is available as free software, which means they do not develop any proprietary softwre; that’s why their practice is acceptable. The FSF will never do that–we believe our terms should be the same for everyone, and we want to use the GPL to give others an incentive to develop additional free software. But what they do is much better than developing proprietary software.

    If contributors allow an entity to relicense their contributions, that enables the entity to write proprietary software that includes those contributions. One way to ensure they have that freedom is to require contributors to sign a CLA that allows relicensing, so clearly CLAs can enable behavior antithetical to FOSS… but they can also enable FOSS development by generating another revenue stream. And many CLAs don’t allow relicensing (e.g., Apache’s).

    Many FOSS companies require contributors to sign CLAs. For example, the FSF has required them since 2005 at least, and its CLA allows relicensing. They explain why, but that explanation doesn’t touch on why license reassignment is necessary.

    Even if a repo requires contributors sign a CLA, nobody’s four freedoms are violated, and nobody who modifies such software is forced to sign a CLA when they share their changes with the community - they can share their changes on their own repo, or submit them to a fork that doesn’t require a CLA, or only share the code with users who purchase the software from them. All they have to do is adhere to the license that the project was under.

    The big issue with CLAs is that they’re asymmetrical (as opposed to DCOs, which serve a similar purpose). That’s understandably controversial, but it’s not inherently a FOSS issue.

    Some of the same arguments against the SSPL (which is not considered FOSS because it is so copyleft that it’s impractical) being considered FOSS could be similarly made in favor of CLAs. Not in favor of signing them as a developer, mind you, but in favor of considering projects that use them to be aligned FOSS principles.




  • The tech I’m talking about isn’t related to speed limits, but zones where pedestrians, particularly children, are much more likely to be in the street.

    when you exceed the speed limit the car automatically notifies the government so they can find you.

    I assume you meant “fine”; regardless, why is there a need for that in order to enable the second piece?

    You can opt-in to have the car automatically control you top speed so you don’t get fined.

    Change that to “You can enable a feature that will automatically reduce your set cruising speed (or, if you’re not using cruise control at that point, give you tactile feedback on the accelerator foot pedal) when you enter an area where pedestrians are in the street or are expected to be in the street (i.e., there’s a cross walk up ahead and a pedestrian has triggered it).” Or, to summarize similar to what you said: “You can have the car automatically reduce your speed when necessary so you don’t kill people.”



  • If ebikes are disproportionately represented in cycling accidents

    To be clear, based off the (incomplete) data I have, it looks like e-bikes are under-represented. 22% of bicycles are e-bikes and e-bikes only make up 10% of cycling accidents.

    It’s possible the 10% stat was of total accidents, making it 20% of cycling accidents, meaning they’d be properly represented. Or maybe the stat is from multiple years ago, when e-bikes made up 10% or less of bikes on the road. Or both, in which case they would be over-represented, at which point it would at least make sense to include the stat.

    If they are over-represented, what you said would make sense! And at that point, I would think it would be most effective to focus on providing more opportunities for training and education to riders. Maybe they’re already doing that, too, and this is just one more thing they’re exploring.


  • The speed limits they listed seem so low given that 90% of bicycles in Amsterdam (or at least, those that are “victims” in traffic accidents) are unpowered. I’m not even a hobbyist cyclist, but on my (unpowered) entry-level hybrid bicycle I rode faster than 25 km/h (or 15 mph) the last time I took it out… and heck, I can run faster than 15 km/h.

    The accident stats also don’t back up the idea that e-bikes are a problem demanding regulation, which makes me think that there’s knee-jerk politics at play here rather than this being a clear-headed response to a real problem. I’ll explain how I arrived at that conclusion.

    First of all, as an aside, it’s weird that they said “more than half of all traffic victims were on a bicycle,” when the metric here should be the number of traffic collisions caused by cyclists. But supposing that’s actually what they meant:

    • if half of all accidents are caused by bicycles, then the other half are caused by cars and other motor vehicles. Since bicycles outnumber cars 4:1 in Amsterdam, that means cars are 4 times as likely to cause accidents as bicycles (startling low compared to how much more dangerous they are in the US). They recently lowered the speed limit of cars to 30 km/h, but I’m not sure if the stats take that into account. Maybe it needs lowered further, or maybe they should only allow cars with the same sort of smart governors installed that they’re testing out for e-bikes?
    • One in ten of those cyclists was on an electric bike (meaning 5% of accidents were caused by someone on an e-bike). 57% of bicycles sold in the Netherlands in 2022 were electric, but bikes last a while and they have a ton of them. As of the start of 2023 they had an estimated 5 million e-bikes, and the country has 23 million bicycles total (more than 1 per person). This means that 22% of their bikes are e-bikes, and (assuming that ratio applies to bikes on the road in Amsterdam) then given that only 10% of accidents involving bicycles involved e-bikes, that means that unpowered bicycles are a bit over twice as likely to cause accidents as e-bikes. Honestly, though, the ratio of e-bikes to unpowered bicycles is probably higher - I would expect people are more inclined to ride the new bicycle they just bought rather than one of the ones they’ve had for several years.

    Obviously these stats are fairly sloppy, but I worked with what I could find.

    Assuming my conclusion is accurate, this still doesn’t mean that e-bikes are less dangerous than bicycles - the accidents they’re in may be worse - but it certainly doesn’t suggest that e-bikes are the problem. I’m aligned with the other commenters here - this isn’t going to address the problem of people riding already illegal e-bikes.

    The tech sounds cool and I’d love if it could be applied to cars, too, even if it’s opt-in only.




  • If you need/want a robust multi-user experience, specifically with private personal library support, then Photoprism isn’t going to work, unfortunately.

    • Free:
      • You can create multiple Admin users in the free version, but they all can see and delete everything (unless you don’t give Photoprism delete access)
    • Paid (Essentials or Plus)
      • you can create “User” users who can upload photos - but they still have access to your full library
      • you can create “Viewer” users who can’t see private photos (but they also can’t upload photos).
      • you can share links to albums that are viewable by anyone with the link

    I’ve been using it single user and it’s been great, though I should add the caveat that I upload my photos to my server using Photosync and don’t give Photoprism write/delete access to my library, so no uploads come from it. I had been using Photosync for years before even hearing about Photoprism so it just fit very neatly into my existing process.

    Multi user features are effectively paywalled and not technically FOSS due to not allowing commercial use, but roles are documented at https://docs.photoprism.app/user-guide/users/roles/ and there’s more info at https://docs.photoprism.app/user-guide/users/libraries/

    If Photoprism Plus/Essentials features could work for you, but the ongoing subscription is an issue, then you should know that - unless this has changed - you can sub for one month on Patreon or Github, use the info they provide to upgrade to using the Essentials or Plus features, and then cancel the subscription. I still have an ongoing one but I didn’t connect it to my Patreon account or anything so I don’t think anything would change (except for me no longer getting support, if I needed it) if I canceled it.



  • Have you considered not using the Home Assistant OS? You don’t need to run it to use Home Assistant. You can instead set your host up with some other OS, like Debian, and then run Home Assistant in a docker container (or containers, plural) and run any other containers you want.

    I’m not doing this myself so can’t speak to its limitations, but from what I’ve heard, if you’re familiar with Docker then it’s pretty straightforward.

    A lot of apps use hard coded paths, so using a subdomain per app makes it much easier to use them all. Traefik has middleware, including stripPrefix, which allow you to strip a path prefix before forwarding the path to the app, though - have you tried that approach?



  • hedgehog@ttrpg.networktoSelfhosted@lemmy.worldWhy docker
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    I don’t think you understood the context of the comment you replied to. As a reply to “Here are all these drawbacks to Docker vs hosting on bare metal,” it makes perfect sense to point out that the risks are there regardless.

    Unless I misread your comment and you’re suggesting that you think devs not having to deal with OS-specific code is a disadvantage of Docker. Or maybe you meant your second paragraph to be directed at OP?