Live data from Hacker News

Piku: Allows git push deployments to your own servers

github.com

121–130 of 169 posts

Re: Piku: Allows git push deployments to your own servers

#121

Earlier quoted context omitted.

Question - how can dependency hell be solved when using such a tool? It seems so elegant and I love the "it just works" attitude, and I do understand that docker can't be used everywhere due to its technical (and mental) overhead, but I love it because it allows to isolate everything, freeze everything in time so running a container 5 years for now "just works". In my humble workflow, I'm using lazydocker to manage t…

Personally I use the same approach to piku, but instead rebuild my Nixos config on push. My projects use nix flakes, so I get both something that I know will run on my server and on my local machine with the full development environment. No containers needed technically, but I use systemd nspawn to run the software in its own sandboxed namespace. My entire server is then managed declaratively, so if I want to add a n…

This sounds super interesting! Do you have an example of such a config somewhere, that you can share?

Re: Piku: Allows git push deployments to your own servers

#122
post #109

Can it be a good replacement for Capistrano (for deploying rails applications)? Love the focus on being lightweight Recently I wanted to create a super basic website, and discovered it’s actually pretty hard to create something simple And then, even if you manage to create something actually simple, you usually end up having to manage some not so simple deployment process together with hopefully some sort of version…

Also an option, if it's just for you and with not too many updates, you can upload the new files to ftp as a manual step.

Does GitHub pages support ftp? Or are you talking about some other potential hosting options?

Yes, ftp is pretty easy for static sites. However, given I want to have version control, it’s nice to have automated deploys happen after a git push

Re: Piku: Allows git push deployments to your own servers

#123
post #109

Can it be a good replacement for Capistrano (for deploying rails applications)? Love the focus on being lightweight Recently I wanted to create a super basic website, and discovered it’s actually pretty hard to create something simple And then, even if you manage to create something actually simple, you usually end up having to manage some not so simple deployment process together with hopefully some sort of version…

Use Podman Quadlet, I use it as replacement

Re: Piku: Allows git push deployments to your own servers

#124

Earlier quoted context omitted.

I developed security software in Python that ran on 100k+ production nodes covering dozens of operating systems. They all had Python.

Counter-anecdote: none of my Linux PCs have python.

Debian comes prepackaged with Python. If there are distros that are good enough for a server almost out of the box, surely Debian stable is one.

Re: Piku: Allows git push deployments to your own servers

#125
post #121

Earlier quoted context omitted.

Personally I use the same approach to piku, but instead rebuild my Nixos config on push. My projects use nix flakes, so I get both something that I know will run on my server and on my local machine with the full development environment. No containers needed technically, but I use systemd nspawn to run the software in its own sandboxed namespace. My entire server is then managed declaratively, so if I want to add a n…

This sounds super interesting! Do you have an example of such a config somewhere, that you can share?

I did a write-up of setting up nixos with git deploys here: https://mccd.space/posts/git-to-deploy/.

As far as the nixos config is concerned, there is nothing crazy in it. It is just a regular nix config with nginx (https://nixos.wiki/wiki/Nginx). You can see there that adding nginx is just four lines of code, ~eight with ssl. Use it to proxy to your applications that are setup as systemd services (https://wiki.nixos.org/wiki/Systemd/User_Services).

Edit: btw I'm a big fan of asciinema! ty for making it. :)

Re: Piku: Allows git push deployments to your own servers

#127
post #89
post #78

Earlier quoted context omitted.

To be honest, Python made it stupendously simpler than anything else because it has a great standard library. The only dependency (click) is rock solid and made it a lot simpler to handle commands independently, but we could probably do without it and just use the built-in argparse—-but at the expense of a few more lines of code I didn’t want to maintain. Also, Python is everywhere, on every OS and Linux system, so i…

That’s pretty funny. You may want to look a little further field to discover that the machines with Python are far from “all the machines” out there. Particularly production servers, which, if they run responsibly, are hardened with every extraneous bit of software removed.

I used to run Python 2 on OpenVMS in production. Python can have a pretty wide footprint if one looks around.

Re: Piku: Allows git push deployments to your own servers

#128

That is brilliant. Something complex, but not complicated. A project distilled down to its UNIX essence: hackable, lean, and magic. That said I want to give this a go but don't immediately see how I can migrate my overengineered 8-10 container spaghetti of a docker-compose file to a state where I can use piku instead of manual 'git pull && docker compose up' on the remote

Can't you use git hooks to automate the manual steps?

Re: Piku: Allows git push deployments to your own servers

#129
post #4

This looks good, and Dokku has been very solid for me, but removing the Docker dependency means that now I'm beholden to my OS's choices. For apps that might run for years without maintenance, that's not ideal, as you'll quickly find you need a specific version of the OS for them.

I use docker compose + traefik. It's nicer than dokku for me because there are less magical abstractions.

Re: Piku: Allows git push deployments to your own servers

#130
post #124

Earlier quoted context omitted.

Counter-anecdote: none of my Linux PCs have python.

Debian comes prepackaged with Python. If there are distros that are good enough for a server almost out of the box, surely Debian stable is one.

Not sure who's to "blame", but I was super surprised a few days ago when I installed Kubuntu 24.04 (minimal), and Python was missing. Was fine though as I strictly use via pipx and miniconda only, but still surprising.
Post reply on HN