Playbook - danvk/better-pull-requests GitHub Wiki

Deploying a new version to gitcritic.com

# (on your machine)
# Set up a fresh repo & environment
git clone https://github.com/danvk/better-pull-requests.git
cd better-pull-requests
pip install -r requirements.txt
source env/bin/activate

# Run the tests. Start the server and run the tests in separate terminals.
pylint -E *.py
python *_test.py
export BETTER_PR_CONFIG=testing.config; python app.py
casperjs test pdiff-tests/*.js

# (on EC2)
# Deploy to EC2. Get the key from Isaac or Dan.
ssh -i amazonkeypair.pem [email protected]
cd better-pull-requests
git pull
pylint -E *.py
python *_test.py
killall -i uwsgi
export BETTER_PR_CONFIG=gitcritic.cfg; env/bin/uwsgi --socket 127.0.0.1:8080 -w WSGI:app --logto /tmp/mylog.log &

If you need to change the nginx configuration, run:

sudo service nginx restart

Debugging an "internal server error"

You can see errors from the Python application by running:

tail -f /tmp/mylog.log

You can see nginx errors by running

sudo tail -f /var/log/nginx/error.log