Is deploying django using source distribution better than git.

Hello,
I have small django app deployed to amazon lightsial, I use git to update source code from my local machine, then I pull the changes in the VPS & restart the server.

This workflow is good for me,
But. I found a tutorial that recommend using setup.py script to pack a source distribution .gzip file, then copy the file to the VPS and install it.

I know it may be a personal prefernces, but I am curious about asking if there is any significant benefit from using the source distribution files.

Thanks

It’s useful in those situations where, for whatever reason, you don’t have access to a common git repo for the deployment.

Examples:

  • You don’t have and aren’t allowed to install a git client on the system being used.
  • You’re deploying to an isolated network that can’t connect to your repo

There may be others, but these are the two situations I’ve encountered.

1 Like

Thanks for reply, I have benifited greatly ( atleast I will stay with my simple running .git workflow )