M readme.md +24 -0
@@ 2,6 2,30 @@
Qwerty War is a JavaScript typing game inspired by [Qwerty Warriors]. Play at http://www.qwertywar.com/.
+## Dev environment setup
+
+ sudo apt install python3-pip
+ sudo -H pip3 install --upgrade pip
+ sudo -H pip3 install virtualenv
+ virtualenv venv
+ source venv/bin/activate
+ # for dev, only needs django, the other dependencies in requirements.txt are for Heroku
+ pip install django
+ export DJANGO_DEBUG=1 # development only, used in settings.py
+ ./manage.py runserver
+
+## Deployment to Heroku
+
+Install git and set up ssh keys with Heroku. Does not use the heroku command line tool.
+
+To deploy to test:
+
+ ./deploy.sh
+
+To deploy to production:
+
+ ./deploy.sh production
+
---
[Qwerty Warriors]: http://www.crazymonkeygames.com/QWERTY-Warriors.html
M settings.py +4 -3
@@ 49,8 49,9 @@ USE_TZ = True
ALLOWED_HOSTS = [
'qwertywartest.herokuapp.com',
'qwertywar.herokuapp.com',
- 'www.qwertywar.com'
+ 'www.qwertywar.com',
+ 'localhost'
]
-# Heroku example sets SECURE_PROXY_SSL_HEADER - don't need it for now, but might with ssl
-# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
+# For Heroku
+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')