./manage.py makemigrations
./manage.py migrate
./manage.py generate
./manage.py runserver
python setup.py test
ssh [email protected]
apt-get update
apt-get install git python-pip sqlite apache2 libapache2-mod-wsgi
easy_install --upgrade pip
pip install virtualenv
cd /var/www
git clone [email protected]:brady-vitrano/ecommerce-demo.git website
cd website
virtualenv env
source env/bin/activate
pip install -r requirements.txt
./manage.py migrate
./manage.py generate
chown -R www-data:www-data .
Before you continue, I highly suggest you verify the site is working by running it manually.
./manage.py runserver 0.0.0.0:8000
and visit the url on port 8000
Change the following in settings.py
AUTH_TOKEN = "some random string"
DEBUG = False
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ["example.com"]
secret.txt
vim /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static/ /var/www/website/website/static/
<Directory /var/www/website/website/static>
Require all granted
</Directory>
WSGIScriptAlias / /var/www/website/website/wsgi.py
WSGIDaemonProcess example.com python-path=/var/www/website:/var/www/website/env/lib/python2.7/site-packages
WSGIProcessGroup example.com
<Directory /var/www/website/website>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
</VirtualHost>
service apache2 restart