Getting code onto the server.
THE OPTIONS
Uploading files directly Pulling from a version control repository An automated deployment process
WHAT TO PREFER
Pulling from version control.
WHY
Repeatable, traceable, and it avoids uploading the wrong files.
WHAT NOT TO UPLOAD
Your virtual environment Configuration containing secrets Development files and caches
WHAT TO DO AFTER DEPLOYING
Install any new dependencies Apply any data changes required Restart the application Check the log Verify the application responds
THE ORDER MATTERS
Dependencies before restart, or the restart fails.
WHAT TO TEST BEFORE DEPLOYING
The change, somewhere that is not production.
WHAT TO HAVE READY
A way to return to the previous version.
WHAT TO AVOID
Editing code directly on the server Deploying untested changes Deploying at a busy time
THE DIRECT EDITING POINT
Changes made on the server are lost at the next deployment and exist nowhere else.
WHAT TO DOCUMENT
The deployment steps, so anyone can follow them.