HACKER Q&A
📣 jcuenod

How do you deploy your side project?


I'm trying to figure out how to deploy my side project (solo dev) but I'm no devops pro. My stack is node + postgres. I'd love to have a nice CI/CD pipeline so I'm curious what others have found successful at this scale.

It seems as though caprover and dokku are in this kind of space. I've also considered k8s/k3s but it seems overbearing. I'm experimenting with docker swarm mode, which seems more manageable. Just looking for recommendations.


  👤 Jemaclus Accepted Answer ✓
I have this problem as well, and I'm commenting here in part to follow the thread.

I have a Go project, so all I really need to do is deploy a binary. My go-to in the past is just to SCP onto my server, but since the other binary is already running, there's some blue/green swap thing that has to happen, and I struggle with this.

My side projects don't make any money, so I want this to be as free as possible, and so I've so-far resisted complex CI/CD pipelines, but it feels like I'll need to put more money into this if I want the CI/CD thing instead of SSHing in to disable the server, SCPing the new binary, and then SSHing back in to restart the service.

If anyone has any recommendations for CI/CD deployments of Go binaries onto an AWS EC2 server, I'd love to hear more.


👤 tedmiston
GitHub Actions workflows go a long way and you get a generous amount of free build minutes per month.

Here's their Node setup action and a minimal workflow.

https://github.com/actions/setup-node

You can use something like AWS ECS Fargate to run your app containers as scalable tasks easily if you're already Dockerized. And there are alternatives like Elastic Beanstalk if you're not.

You might also consider more PaaS type solutions like Heroku.

If you don't need a stateful server, something like Vercel Serverless Functions provides a pretty nice dev experience.

https://vercel.com/docs/concepts/functions/serverless-functi...


👤 rudasn
Since this is a side project, it depends on what you want to learn at the end of the day.

You could invest in learning the tools that bigger teams are using, like kubernetes, or cloud-specific offerings, like AWS Fargate or whatever, but my guess is that if you don't already use those tools for your day job you may end up spending more time on "how to deploy" as opposed to actually having something to deploy.

A simpler approach would be to focus on sharpening your existing skills, or perhaps using one or two additional tools that get the job done without too much fanfare.

For example, if you already use git you could learn how to setup your own git server with hooks, so that you can just `git push production v0.0.2` to your own server to deploy your application.

Personally I find docker a very nice tool for both development and production as it allows me to quickly try out new things without messing up with my dev or prod machines. There's a lot of things to learn (if you aren't familiar with it yet), and it's best to start from the basics (networks, volumes, container lifecycle) and later move on to more complicated stuff, if and when, needed (swarm).

Just keep in mind what your end goal is: if your side project is more about learning how to deploy real-world apps at scale then yes, kubernetes and cloud-specific technologies may be the best approach. If you just want to get your code out there and used by other people you can easily get away with `git pull && npm start`.


👤 debaserab2
I just launched my most recent side project on Cloudflare pages. It's a pretty great UX. Just plug in your git repo, add your build steps, and it basically takes care of the rest: reversible production deployments - a long with unique endpoints for development branches. My project is purely static which makes it considerably easier to deploy, but I'm looking forward to trying out Cloudflare Workers the next time I have more steep requirements.

Personally I'm pretty steeped in the devops world at my day job so dealing with that as little as possible is pretty appealing to me for hobby projects.

Might be a no-go for you if Postgres is a big part of your project.


👤 jacobrussell
For web applications

Frontend: Angular

Backend: Python

CI/CD: GitHub Actions

Cloud: AWS

DB: Postgres or DynamoDB