Hacker News new | ask | show | jobs
by asymptosis 1744 days ago
I'm intrigued by this. However -- and this is probably a cultural thing with me being an old-timey unix guy who likes to build things from scratch -- I have a point of confusion.

If you choose Run A Server, it suggests two main options: Ansible or Docker. It specifically warns against "from scratch".

When I'm developing software, I want people to be building it from scratch. If someone likes something I made enough that they want to take it and build a docker or ansible thing out of it ... okay, that's flattering, albeit a little confusing, and it's not my default.

And I probably wouldn't agree to support those third-party ansible/docker things which someone else felt the need to create.

What happened to rolling a versioned tarball that you can chuck in opt or wherever and point nginx at it? Eg, if I knew I could pull in versions of lemmy server through my package manager, I'd be totally trying it out as my side-project this weekend.

5 comments

Perhaps it's to reduce overhead in troubleshooting questions for those who 'just want it to run' rather than be curious about the nature of it.
Indeed this seems to be the main cause for them to recommend either Docker or Ansible.

This is what the notice (https://join-lemmy.org/docs/en/administration/from_scratch.h...) actually says:

> Disclaimer: this installation method is not recommended by the Lemmy developers. If you have any problems, you need to solve them yourself or ask the respective authors. If you notice any Lemmy bugs on an instance installed like this, please mention it in the bug report.

Supposedly so it's easy to reproduce issues locally. I remember participating in the PHP community long time ago, and constantly having to replicate peoples arbitrary Apache/NGINX configurations just in order to reproduce issues, so it's not surprising that people are using Ansible/Docker for setting up development environments.

I just wished people stopped pushing for that bloated mess in production too, but step by step...

Theoretically, you could run a web server and database both written in rust and have your entire dependency stack contained within cargo. Literally deployment with a single `cargo build` and just a couple weeks of build time
Sure, which is what the conduit Matrix server does. But at a certain point people will likely want a resilient database.
From a cursory look running the backend is close to as simple as installing libpq and then

  cargo build --release
and then creating the PostgreSQL user and database, and editing a config file then running the lemmy binary.

I don’t see a problem.

Serving the frontend cannot be a challenge either I imagine but I didn’t bother looking at the frontend.

Thanks for the pointer. I guess I was more thinking about the culture involved in explicitly denouncing a from-source build. Sorry if that wasn't clear.
I suppose the Ansible and Docker versions are both built from the source, in a reproducible manner. What would you gain by going through the build steps manually by yourself?

From my point of view, having to build things is a hassle: one needs the dependencies, it will work differently on different OSes/distros, the maintainer needs to keep the build instructions up-to-date and verify manually that they won't break (for all OSes/distros). Ansible or Docker just gives you a reproducible thing, easier to verify in one step whether the build instructions in it still work.

> What would you gain by going through the build steps manually by yourself?

To know your enemy, you must become your enemy - Sun Tzu, "The Art of War".

Developers as well as operators should read Sun Tzu and take what they read to heed. To know what you're running it makes sense to know what you're installing. While this still leaves open the chance of the actual code being riddled with nasty bits it at least removes the chance of the Ansible playbook or dockerfile adding something "extra".

If you look in their docker-compose.yml file, they’re also running an instance of pictrs. So I assume that image uploads would be borked on a manual install. There’s another fork that uses iframely in a similar way
The Canadian instance has some resources on that: https://lemmy.ca/post/975
I've installed it from scratch. It's not complicated, get Postgres set up, do a cargo build, and set up the settings.
when you maintain an open source project you’re inundated with a constant stream of questions from beginners (no matter how much documentation you have), and using docker eliminates some of those questions