Ask HN: How do you deploy your side-projects?
31–40 of 82 posts
Re: Ask HN: How do you deploy your side-projects?
#32Re: Ask HN: How do you deploy your side-projects?
#33Cloudflare Workers is a big time saver for my side projects. I don’t use JavaScript/TypeScript/WASM at work, but it’s been great.
How do you deal with persistant data? What DB service etc?
For document storage, Durable Objects is amazing: * https://developers.cloudflare.com/workers/runtime-apis/durab... * https://blog.cloudflare.com/durable-objects-easy-fast-correc...
For relational data, there's now D1 (open beta): * https://developers.cloudflare.com/d1/
For bulk storage, there's R2: * https://developers.cloudflare.com/r2/
Re: Ask HN: How do you deploy your side-projects?
#34Hetzner 5€ vps with nginx as reverse proxy
Re: Ask HN: How do you deploy your side-projects?
#35Re: Ask HN: How do you deploy your side-projects?
#36I deploy to a virtual machine. I use Ansible to set up the machine and install a container runtime, then i set up traefik + containers using Ansible and docker compose files. If I ever do need to scale it's easy to switch to docker swarm which is quite capable. It's also easy to deploy the full stack somewhere else quickly. I wish it was easier to do firewall configuration when using docker, since it basically occupi…
Re: Ask HN: How do you deploy your side-projects?
#37Re: Ask HN: How do you deploy your side-projects?
#38Re: Ask HN: How do you deploy your side-projects?
#39Check https://dokku.com . Easy to set on your VPS, support Heroku buildpacks and almost-zero-to-none management (assuming you update your server from time to time). And you get Heroku-style deployment. Running some projects with it for the last 5-6 years and had couple of Dokku versions upgrades - zero issues so far.
Re: Ask HN: How do you deploy your side-projects?
#40Cost per "project": domain + shared cost of the dedicated instance. Right now the dedicated instance is running 8 projects in total, I pay ~70 EUR a month, so about 8.75 EUR + .com domain for each which works out to be ~20 EUR per year, 1.6 per month. Also using Migadu for email, shared between all little projects, ~30 EUR / month (so currently 3.75 EUR per project per month).
Each project added makes cost per project lower, as they all share the same infrastructure.
Environment is setup so every service has it's own systemd user service. Deploys happen by doing the following steps:
- Build and test project locally
- Copy artifact/binary to server with ssh, rename file to be versioned incrementally
- Restart systemd service
- New service deployed
- If database migrations have to be run, I execute them here
- (if something goes wrong, I copy old artifact to "production" directory and restart service again, poors-man rollback)
- Send a marker to Grafana that a deploy have happened so it's visible in the dashboard
As it stands right now, it seems to be about 13 EUR per month per project, but as mentioned before, gets cheaper for each added service. None of them are particularly performance sensitive or use a lot of resources. As a max, I've run something like 15 services on this very machine without any problems. Everything goes via Caddy that acts like a proxy front for everything.
One of the projects got more popular one time and started impacting the performance of the others, I simply replicated exactly the same environment to a new dedicated server where it lived by itself from there on.