Skip to content

Instantly share code, notes, and snippets.

@greut
Created March 18, 2017 15:57
Show Gist options
  • Save greut/48ac24b766d7075be6f148523c41d045 to your computer and use it in GitHub Desktop.
Save greut/48ac24b766d7075be6f148523c41d045 to your computer and use it in GitHub Desktop.
Deploying Django application
#!/bin/bash
#
# Usage: ssh <host> ./deploy.sh
#
set -xe
. ~/.bash_profile
cd www/app
. bin/activate
export DJANGO_SETTINGS_MODULE=chain_reaction.settings.production
git pull
python manage.py migrate
python manage.py collectstatic --noinput
sudo sv restart uwsgi
sudo sv reload nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment