Live data from Hacker News

Piku: Allows git push deployments to your own servers

github.com

31–40 of 169 posts

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

#31
I love piku. I wrote a webapp tutorial for piku which got turned into a repo as part of the official GitHub piku org. You can find that here:

https://github.com/piku/webapp-tutorial?tab=readme-ov-file#b...

It explains how piku works under the hood, as well as showing a minimalistic Python web app example from a user standpoint.

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

#32
post #29

Does someone know how it handles (if any) zero downtime deployments? Like, if your Python service is running in one machine on port 8080 behind nginx, how does piku switch to a fresh instance running in the same port?

Currently it will only kill running processes after it finishes deploying the new git push. Socket and session handling will vary depending on your code and whether you use uwsgi or run your own HTTP daemon.

One thing it already does (optionally) is to kill off unused instances and idle, lazily starting them when a new connection comes in.

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

#33
post #16

I think a more common use case than doing deploys by pushing to a different remote is to send git repo webhooks on PR merges to main to an API that has a deploy key and can fetch the repo itself. This afaik is missing from most PaaS tools (CapRover excluded, but it has been illegally relicensed to non-open-source). Perhaps watchtower or something could replace the functionality?

Actually, this is how I deploy my static websites: piku in lazy mode handles GitHub hooks, pulls the source and renders them out to cloud storage, then kills all workers and idles again.

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

#39

I love piku. I wrote a webapp tutorial for piku which got turned into a repo as part of the official GitHub piku org. You can find that here: https://github.com/piku/webapp-tutorial?tab=readme-ov-file#b... It explains how piku works under the hood, as well as showing a minimalistic Python web app example from a user standpoint.

"What is a Heroku-style deploy?"

thanks for that. I have no idea what heroku is or does.

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

#40
post #30
post #28

Earlier quoted context omitted.

That depends on your tech stack. I have Perl CGI and Java apps that have been running unchanged for two decades. And the only thing I ever had to change on Debian over that time was adding HTTPS (Let's Encrypt) and SPF/DMARC for email.

Yeah, but my point is that you have to upgrade your OS. If you never change anything, obviously you don't need to worry.

My point is that OS upgrades don’t have to break tech stacks, and don’t tend to with runtimes that care a lot about backwards compatibility like Perl and Java. I did regularly upgrade Debian across those two decades.

IMO that quality should be the default, and I would choose my OS and tech stacks accordingly.

Post reply on HN