HACKER Q&A
📣 bitgif

How do you deploy your weekend project in 2022?


What do you use to launch your weekend project these days?

Example, I'm developing a simple Python project that uses database. Need db service that I don't want to manage. Also, want to auto scale


  👤 MacsHeadroom Accepted Answer ✓
Bare metal from the likes of Hetzner for most things. Serverless for some small components which benefit from global distribution.

I currently have ~30 containers running on a Hetzner server w/ 64GB of RAM and 16 dedicated cores for ~$25/mo. I even get direct access to the Intel iGPU for graphics acceleration at no additional cost.

Cloud providers like AWS give you a couple orders of magnitude less resources for the same dollars. Too many engineers are getting fleeced into using crappy solutions (VPS's, almost anything by AWS/Azure/GCloud/Digital Ocean) because they're all they've ever known.


👤 1776smithadam
We just posted our first Show HN ever with your exact same setup, but s/python/go. If you're running it in Docker, then this might work for you too:

1) CloudRun ( run a Docker container exposing a port to the web )

It can autoscale.

2) CloudSQL ( managed Postgres and some other SQL choices )

We faced some friction getting the two connected. CloudSQL is available on an IP address, then in our code we have PSQL library which we specify the IP address to. The complication was that CloudRun instances can't actually "see" the CloudSQL. After navigating the GCP documentation, website, and some trial and error, it magically worked.

It was painful to get setup but it's running smooth now.


👤 hilti
If auto scale is needed, then I‘m sticking to Firebase hosting, cloud functions written in NodeJS and BigQuery or Firestore depending on the update frequency

For recent projects where auto scale is not needed I‘m happily using FlightPHP as a REST framework and use SQLite as my db service. Frontend UI is provided by just including Bootstrap.

This setup feels great, because it takes me back to my origins of web development: simple tools that work and get stuff of my plate.

Before installing 250 MB of NPM dependencies, pre-processors etc.


👤 napsterbr
I don't side-project anymore, but here's what I used to do back in the day:

I got myself a dedicated box from OVH, located in Canada. 32 threads, 64 GB EEC, NVMe disks and unmetered 1Gbps outgoing link. That cost me ~$100.

In it I had my application server and database, as well as disk caching layer in front of S3.

No need to worry about auto-scaling, as that beefy server could take care of 10-100x more users than I currently handled.

No need to worry about bandwidth costs or getting DDoSed. The gigabit link was more than sufficient (I think I used 5% of it), and OVH provides an anti-ddos service included in the price.

I had a cheaper ($10) dedicated box from Kimsufi which I used to host CI, Phabricator and other non-critical stuff.

I'd deploy with a simple ansible script which would launch a new docker container that HAProxy would then point to (similar to a green-blue deployment). This allowed me to deploy small changes[0] silently and I could test them before the actual release.

My side project was not critical enough, so if for any reason my host was unreachable I could perform a disaster recovery anywhere else by restoring from my backups. In ~4 years, I never had to do that.

If I were to start a side / weekend project today, I would probably follow a similar route. Running cloud compute instances with unpredictable bandwidth billing gives me anxiety.

[0] - As long as they did not have database migrations in them.


👤 nullandvoid
Cloudflare pages for hosting my create-react-app react frontend (free, handles https for me also). Set up to auto deploy on push to repo (cloudflare makes this really easy through their UI)

Digital ocean droplet for hosting my typescript node backend (api) server. Sqlite for storage ($5/mo). Right now I'll typically just git pull when I want to redeploy, however depending on the project I may setup a docker compose script to spin up containers, that gets automatically run on commit to main.

I let cloudflare handle DNS for free also, and have it proxy to sideproject.com / api.sideproject.com for ddos mitigation.

Auth0 free tier for handling auth between.


👤 bko
I like Serverless on aws. It's super cheap (free tier), and even the database in RDS has a free version for Postgres. Front end I like to deploy using Next.js and Vercel or Netlify.

I haven't had a problem scaling because its all lambda so it scales nicely and is all self contained for functions.

I've used DynamoDB with is even simpler but if you think you'd ever want something relational or more familiar I would definitely go with Postgres RDS


👤 matus_congrady
Have a look at https://stacktape.com. It removes the complexity behind AWS and allows you to deploy applications with zero DevOps. It also allows you to fully leverage your AWS free tier.

You can deploy containers, lambda functions, SQL databases, Redis, MongoDb and many more infrastructure components with just a few lines of config.

(I work at Stacktape)


👤 freeqaz
AWS CDK is pretty magical. The whole "constructs" that they have are very powerful. I was able to setup a scale-to-zero RDS Serverless database with an auto scaling backend using ECS + Fargate in a few hours. (With zero prior experience with the CDK)

You can see that code here if you're curious: https://github.com/lunasec-io/lunasec/blob/master/lunatrace/...

It's more complicated now but if you look at the history of that "backend-cdk" folder then it's simpler a few months ago.

The important bit is the "ecs-patterns" library. That's the one that is magical and deals with setting up the load balancer, cluster, etc for you. And the way we shove the Docker images in I found to be quite straightforward. (And deploys are one line)


👤 nathants
on aws as scale to zero services. lambda, dynamo, s3, and ephemeral ec2 spot.

when egress bandwidth is needed i use cloudflare workers + r2 just like i would use s3 presigned urls.

services with no usage should have no cost. services with usage should bill based on usage.

typically i start from a full project template[1][2]. sometimes i start from scratch[3].

1. https://github.com/nathants/aws-gocljs

2. https://github.com/nathants/aws-exec

3. https://github.com/nathants/libaws


👤 reducesuffering
Compute / VPS: Railway, Render, Fly.io, Dokku on any VPS

Managed DB: Railway, Render, Planetscale, Supabase


👤 ranguna
Firebase for the simple to the slightly complex projects.

It's straight forward to deploy, has a generous free tier and scales really well. If I need an sql database, I'll spin one up on aws, but hopefully I'll switch to neondb soon.


👤 rhn_mk1
Typically, something like make && ./start

If it's a daemon, I write a systemd service file.


👤 herbst
For productive sites / services I use a VPS (Vultr) mostly because backups and rollbacks are completely painless which is awesome when you manage everything yourself. Instead of container I just use phusion passenger. Kiss.

I also have 2 dedicated one from a small reseller, one from Kimsufi. They run heavy services like monitoring and additional backups essentially everything where I don't care about 100% uptime.

All public downtimes I've had in the last 4 years or so we're 100% my fault.

Edit:// Its less than $100 for several million page views and some heavy monitoring.


👤 h4waii
I host my side project / "e-commerce" business on a tiny $3/year VPS (found using lowendbox), it only receives bytes (119 to be exact) from the mobile app each time it's used.

Frontend is that handcrafted artisanal static HTML hosted on CloudFlare Pages, and simple button for checkout to Shopify/Stripe/whatever.

The damn licensing for publishing my iOS app costs more than my entire infrastructure. Stay lean!

Honestly, I should simply move to "serverless" ala AWS Lambda, but probably won't until (if) things go gangbusters.


👤 vasergen
since nobofy mentioned, I use https://caprover.com and a server on Hetzner. Caprover is easy to install and use, it has ui, cli, different deployment methods, automatic let's encrypt and possibility to install predefined apps like a database for example. I don't use cluster mode, since there is no need for me, but it has cluster support as well. I would say it is perfect fit for small home lab for personal projects.

👤 oxff
flyio since Heroku had the little accident, works for me

👤 idmontie
I usually just use terraform to deploy to AWS with some additional scripts to rsync files from the CI/CD pipeline.

At this point I just have a template to do it and reuse it in my various projects.

If I don't need a server, I usually just use the Serverless framework.


👤 altilunium
Buy a $1/year domain.

Buy a $1/mo cpanel-based hosting (php+mysql+nodejs+python included), scale as needed, depending how much the traffic it gets (well, most of the time my weekend project is not accepted by the market.. haha)


👤 phendrenad2
Heroku for the webapp ($7/mo), Linode for the DB server and cache server ($10/mo).

I don't need a DB I don't manage (I can handle mysql).

I don't need auto-scaling (and I'll go out on a limb and say that you don't either).


👤 bravetraveler
Still Ansible for me. Too useful for managing APIs and systems

👤 korostelevm
Only does Node.js currently but check out https://www.cyclic.sh. AWS DynamoDB is included in free tier

👤 thegabez
Rails, Heroku, and Cloudflare. Very easy, but costs are rising.

👤 itsmemattchung

  Digital Ocean Web Service  $5.00
  Digital Ocean Worker       $5.00
  ---------------------------------
                             $10.00 per month

👤 derkoe
It depends. Azure Static Webapps + Azure Storage (tables, queues and blob) for simple js web applications. Fly.io for things that need more complex environment.

👤 nocommandline
Serverless on Google Cloud (it scales and no manual management)

1. If DB is needed - Google App Engine with Datastore (default) or Firestore

2. If no DB - Google App Engine (default) or Cloud Run


👤 dmitrygr
For a “weekend project”, “auto scale” will be well served by SQLite.

Always amazes me when people try to design Google-scale solutions to 0.3 QPS problems.


👤 verdverm
GCP & GKE, I already have the cluster so everything pretty much lands there. Great way to learn k8s if you don't know it already

👤 quantumOctopus
Been having good expense with momgodb app services, pretty flexible if you don't know which direction your project will take

👤 whoisjohnkid
terraform and AWS’s free tier. Only costs are route53 costs which depending on your setup you can also eliminate.

I’m usually utilizing a static site generator for main site; usually S3 behind a CDN.

Then I’ll typically have my services written in go running serverless behind apigateway. Then locally I just have my services running on a generic http framework.


👤 thedebuglife
If I want to focus on development without being bogged down in tooling I’ll go for Gatsby with Netlify.

👤 nicbou
Docker containers on a VPS. It works every time.

Now I'm adding Cloudflare in front of it.


👤 phpthrowaway99
Namecheap shared hosting, cpanel, php, myphpadmin for MySQL admin.

👤 quickthrower2
Toss-up between Heroku or Vercel + some postgresql provider.

👤 slt2021
managed hosting from godaddy.com is all you will ever need for this kind of scale

👤 futhey
Dokku + OVH