Created
October 1, 2013 16:51
-
-
Save raonyguimaraes/6781584 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd ~/webapps/app_name/ | |
| ./apache2/bin/stop | |
| rm -rf lib/python2.7/{D,d}jango* myproject* | |
| PYTHONPATH=$PWD/lib/python2.7 easy_install-2.7 -s $PWD/bin -d $PWD/lib/python2.7 zc.buildout | |
| wget http://pypi.python.org/packages/source/d/django-lfs/django-lfs-installer-0.6.0b5.tar.gz | |
| tar zxf django-lfs-installer-0.6.0b5.tar.gz | |
| cd lfs-installer/ | |
| python2.7 bootstrap.py | |
| ./bin/buildout -v # this will take a while to run and produce a lot of output, so be patient | |
| sed -i "s/'ENGINE': 'django.db.backends.'/'ENGINE': 'django.db.backends.postgresql_psycopg2'/g" lfs_project/settings.py | |
| sed -i "s/'NAME': ''/'NAME': 'db_name'/g" lfs_project/settings.py | |
| sed -i "s/'USER': ''/'USER': 'db_name'/g" lfs_project/settings.py | |
| sed -i "s/'PASSWORD': ''/'PASSWORD': 'db_password'/g" lfs_project/settings.py | |
| sed -i "s/ADMIN_MEDIA_PREFIX/#ADMIN_MEDIA_PREFIX/g" lfs_project/settings.py | |
| ./bin/django syncdb | |
| ./bin/django lfs_init | |
| ./bin/django collectstatic | |
| cat > ../lfs_project.wsgi <<EOF | |
| import os | |
| import sys | |
| $( grep -B 1 -A 1 lfs-installer bin/django ) | |
| from django.core.handlers.wsgi import WSGIHandler | |
| os.environ['DJANGO_SETTINGS_MODULE'] = 'lfs_project.settings' | |
| application = WSGIHandler() | |
| EOF | |
| sed -i 's/myproject/lfs_project/g' ../apache2/conf/httpd.conf | |
| ../apache2/bin/restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment