Hacker News new | ask | show | jobs
by rawoke083600 1516 days ago
I feel your pain !

Never underestimate the value of a "good enough" bash scrip to deploy ALL your project(s).

First (ok top 5) thing i do when starting any new project is quickly writing a "bash deploy script" which usually goes like this:

  *build-for-prod

  *post-build-steps (zips, uglify,spit-and-polish etc)

  *tar everything

  *scp tar-file to server(s), extract, restart xyz

Sure it's unsexy as hell in today's world of <insert-fav-deploy-tool-here-that-calls-bash-things-underneath-anyway> but it works so nicely !

Interesting side story, about 10 years ago I was employed by a "big"(for me at least) price comparison service, and for 5 of the 7 years we use a simple bash script to deploy most of our API's and frontend.

Everyone agreed (it's the wrong way) to do it but no one wanted to dive into the alternatives.

We even found a bug where there were some race issues (some weird service configs) when we deployed that it only worked every 2nd time ? horror

So we just "always deployed twice"... since it's was super fast !

1 comments

I did this sort of stuff for a time, it's even better if you link webhooks to your git provider and make those fire the actions directly in the server.

Once the script was set up to do all the build and deployment, we only needed to push to the release branch to load it, just as painless and with more or less the same underlying ideas that the easy CI/CD you get with providers like Heroku et al.

It still really pays off to know a thing or two about sysadmin nowadays, literally and figuratively.