Hacker News new | ask | show | jobs
by Galanwe 3899 days ago
I don't really think you should promote these.

The real way to perform clean update is using a load balancer, offloading instances for upgrade one at a time.

Also please people stop deploying using github. Package management & versioning IS a thing.

> rsync -avz ./ user@remote:/home/user/web-app

This is not an atomic update, meaning that you could end up loading modules from the new version from code of the older version. Use a new directory to upload the new files.

> venv/bin/pip install -r requirements.txt

You do not delete the old requirements, this is incrementally bloating the virtualenv. Just create a new one, virtualenv are designed to be created/removed quickly.

> venv/bin/alembic upgrade head

Huu, that's nice if you only have 1 instance to upgrade at a time. Otherwise it will just blow up.